diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-03-19 06:11:44 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-03-26 13:53:36 -0400 |
commit | 83972ff6ac0d05f3187cb3d4bec3d20325d4afbf (patch) | |
tree | 66c5a40a8b61642e30715bf471ef1b9f96993c8d /lib/internal/bootstrap/pre_execution.js | |
parent | 8209caec3955c029c47d32f0babef627500f3c65 (diff) | |
download | android-node-v8-83972ff6ac0d05f3187cb3d4bec3d20325d4afbf.tar.gz android-node-v8-83972ff6ac0d05f3187cb3d4bec3d20325d4afbf.tar.bz2 android-node-v8-83972ff6ac0d05f3187cb3d4bec3d20325d4afbf.zip |
process: handle --expose-internals during pre-execution
Instead of relying on the value of the CLI option when
executing bootstrap/loaders.js.
PR-URL: https://github.com/nodejs/node/pull/26759
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'lib/internal/bootstrap/pre_execution.js')
-rw-r--r-- | lib/internal/bootstrap/pre_execution.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 233ab4f879..820d931575 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -133,6 +133,9 @@ function initializeReport() { function setupDebugEnv() { require('internal/util/debuglog').initializeDebugEnv(process.env.NODE_DEBUG); + if (getOptionValue('--expose-internals')) { + require('internal/bootstrap/loaders').NativeModule.exposeInternals(); + } } function setupSignalHandlers() { |