diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-01-30 23:19:45 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-02-02 05:41:45 +0800 |
commit | c2359bdad62b83d40976d91e91097684c23a7ae3 (patch) | |
tree | ede78a4d84d9f2c3d661fed39c3a4cf4294d8104 /lib/internal/util | |
parent | 39d922123c02aecc2e289a08e3bdb9515a7b193a (diff) | |
download | android-node-v8-c2359bdad62b83d40976d91e91097684c23a7ae3.tar.gz android-node-v8-c2359bdad62b83d40976d91e91097684c23a7ae3.tar.bz2 android-node-v8-c2359bdad62b83d40976d91e91097684c23a7ae3.zip |
process: expose process.features.inspector
Instead of using process.config.variables.v8_enable_inspector
to detect whether inspector is enabled in the build.
PR-URL: https://github.com/nodejs/node/pull/25819
Refs: https://github.com/nodejs/node/issues/25343
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib/internal/util')
-rw-r--r-- | lib/internal/util/inspector.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/util/inspector.js b/lib/internal/util/inspector.js index 68c20108bd..e237db16a6 100644 --- a/lib/internal/util/inspector.js +++ b/lib/internal/util/inspector.js @@ -3,8 +3,8 @@ let session; function sendInspectorCommand(cb, onError) { const { hasInspector } = internalBinding('config'); - const inspector = hasInspector ? require('inspector') : undefined; if (!hasInspector) return onError(); + const inspector = require('inspector'); if (session === undefined) session = new inspector.Session(); try { session.connect(); |