Skip to content

Commit

Permalink
chore: address code review
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Dec 5, 2019
1 parent 6db1a08 commit 3765e06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 0 additions & 9 deletions lib/internal/per_context/primordials.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,5 @@ primordials.SafePromise = makeSafe(
copyPrototype(original.prototype, primordials, `${name}Prototype`);
});

// Helper caried over from js2c_macros: exits process and prints debug message
// iff node_debug_lib flag is set.
primordials.CHECK = function(x) {
if (process.config.variables.node_debug_lib === false) return;
if (!x) {
(process._rawDebug('CHECK: x == true'), process.abort());
}
};

Object.setPrototypeOf(primordials, null);
Object.freeze(primordials);
10 changes: 9 additions & 1 deletion lib/internal/vm/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const {
ArrayIsArray,
CHECK,
ObjectCreate,
ObjectDefineProperty,
Symbol,
Expand Down Expand Up @@ -59,6 +58,15 @@ const kContext = Symbol('kContext');
const kPerContextModuleId = Symbol('kPerContextModuleId');
const kLink = Symbol('kLink');

// Helper caried over from js2c_macros: exits process and prints debug message
// iff node_debug_lib flag is set.
function CHECK(x) {
if (process.config.variables.node_debug_lib === false) return;
if (!x) {
(process._rawDebug('CHECK: x == true'), process.abort());
}
}

class Module {
constructor(options) {
emitExperimentalWarning('VM Modules');
Expand Down

0 comments on commit 3765e06

Please sign in to comment.