summaryrefslogtreecommitdiff
path: root/test/sequential
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-01-30 23:19:45 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-02-02 05:41:45 +0800
commitc2359bdad62b83d40976d91e91097684c23a7ae3 (patch)
treeede78a4d84d9f2c3d661fed39c3a4cf4294d8104 /test/sequential
parent39d922123c02aecc2e289a08e3bdb9515a7b193a (diff)
downloadandroid-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 'test/sequential')
-rw-r--r--test/sequential/test-async-wrap-getasyncid.js3
-rw-r--r--test/sequential/test-inspector-has-inspector-false.js6
2 files changed, 4 insertions, 5 deletions
diff --git a/test/sequential/test-async-wrap-getasyncid.js b/test/sequential/test-async-wrap-getasyncid.js
index 6a6bf1b407..a5e2bf64d8 100644
--- a/test/sequential/test-async-wrap-getasyncid.js
+++ b/test/sequential/test-async-wrap-getasyncid.js
@@ -289,8 +289,7 @@ if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check
testInitialized(req, 'SendWrap');
}
-if (process.config.variables.v8_enable_inspector !== 0 &&
- common.isMainThread) {
+if (process.features.inspector && common.isMainThread) {
const binding = internalBinding('inspector');
const handle = new binding.Connection(() => {});
testInitialized(handle, 'Connection');
diff --git a/test/sequential/test-inspector-has-inspector-false.js b/test/sequential/test-inspector-has-inspector-false.js
index cdb7ca9e19..56a50408bb 100644
--- a/test/sequential/test-inspector-has-inspector-false.js
+++ b/test/sequential/test-inspector-has-inspector-false.js
@@ -3,10 +3,10 @@
const common = require('../common');
-// This is to ensure that the sendInspectorCommand function calls the error
-// function if its called with the v8_enable_inspector is disabled
+if (process.features.inspector) {
+ common.skip('V8 inspector is enabled');
+}
-process.config.variables.v8_enable_inspector = 0;
const inspector = require('internal/util/inspector');
inspector.sendInspectorCommand(