Skip to content

Commit 4e22b98

Browse files
committed
fixup! src: use option parser for expose_internals
1 parent 8675a23 commit 4e22b98

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/node.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,6 +3339,8 @@ void SetupProcessObject(Environment* env,
33393339
}
33403340

33413341
// --expose_internals, --expose-internals
3342+
// Note that this is not exposed as a process property, it is deleted when
3343+
// node's javascript bootstrap code runs.
33423344
if (expose_internals) {
33433345
READONLY_PROPERTY(process, "_exposeInternals", True(env->isolate()));
33443346
}

test/parallel/test-internal-modules-expose.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ require('../common');
55
const assert = require('assert');
66

77
assert.strictEqual(typeof require('internal/freelist').FreeList, 'function');
8+
assert(!('_exposeInternals' in process), 'no process property is leaked');

0 commit comments

Comments
 (0)