Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-12-26 14:53:36 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2019-01-04 20:25:31 +0300
commitb22c86ed3bd3242177b02a34292febe41275a52b (patch)
treee45fe8e41e4f8fbd20c2dbfffc8c9836ffac815b /src/node_config.cc
parentd4934ae6f2745f8fab1a83821f50290c9688c326 (diff)
src: use `internalBinding('config').hasInspector` in JS land
Instead of `process.config.variables.v8_enable_inspector` which depends on the variable name in gyp files, or detecting `internalBinding('inspector').Connection`. PR-URL: https://github.com/nodejs/node/pull/25291 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_config.cc')
-rw-r--r--src/node_config.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/node_config.cc b/src/node_config.cc
index 7204e246562..8756969cda2 100644
--- a/src/node_config.cc
+++ b/src/node_config.cc
@@ -57,6 +57,12 @@ static void Initialize(Local<Object> target,
READONLY_TRUE_PROPERTY(target, "hasTracing");
#endif
+#if HAVE_INSPECTOR
+ READONLY_TRUE_PROPERTY(target, "hasInspector");
+#else
+ READONLY_FALSE_PROPERTY(target, "hasInspector");
+#endif
+
#if !defined(NODE_WITHOUT_NODE_OPTIONS)
READONLY_TRUE_PROPERTY(target, "hasNodeOptions");
#endif