Skip to content

Commit

Permalink
fixup! src: use option parser for expose_internals
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-github committed Apr 6, 2017
1 parent 8675a23 commit 4e22b98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3339,6 +3339,8 @@ void SetupProcessObject(Environment* env,
}

// --expose_internals, --expose-internals
// Note that this is not exposed as a process property, it is deleted when
// node's javascript bootstrap code runs.
if (expose_internals) {
READONLY_PROPERTY(process, "_exposeInternals", True(env->isolate()));
}
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-internal-modules-expose.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ require('../common');
const assert = require('assert');

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

0 comments on commit 4e22b98

Please sign in to comment.