Skip to content

Commit 3765e06

Browse files
committed
chore: address code review
1 parent 6db1a08 commit 3765e06

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

lib/internal/per_context/primordials.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,5 @@ primordials.SafePromise = makeSafe(
124124
copyPrototype(original.prototype, primordials, `${name}Prototype`);
125125
});
126126

127-
// Helper caried over from js2c_macros: exits process and prints debug message
128-
// iff node_debug_lib flag is set.
129-
primordials.CHECK = function(x) {
130-
if (process.config.variables.node_debug_lib === false) return;
131-
if (!x) {
132-
(process._rawDebug('CHECK: x == true'), process.abort());
133-
}
134-
};
135-
136127
Object.setPrototypeOf(primordials, null);
137128
Object.freeze(primordials);

lib/internal/vm/module.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
const {
44
ArrayIsArray,
5-
CHECK,
65
ObjectCreate,
76
ObjectDefineProperty,
87
Symbol,
@@ -59,6 +58,15 @@ const kContext = Symbol('kContext');
5958
const kPerContextModuleId = Symbol('kPerContextModuleId');
6059
const kLink = Symbol('kLink');
6160

61+
// Helper caried over from js2c_macros: exits process and prints debug message
62+
// iff node_debug_lib flag is set.
63+
function CHECK(x) {
64+
if (process.config.variables.node_debug_lib === false) return;
65+
if (!x) {
66+
(process._rawDebug('CHECK: x == true'), process.abort());
67+
}
68+
}
69+
6270
class Module {
6371
constructor(options) {
6472
emitExperimentalWarning('VM Modules');

0 commit comments

Comments
 (0)