Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! process: expose process.features.inspector
  • Loading branch information
joyeecheung committed Jan 30, 2019
commit 66aebeb0d3fee48c6f9745a22d7edab2862e5b35
12 changes: 6 additions & 6 deletions src/node_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ 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

#endif // NODE_HAVE_I18N_SUPPORT

#if HAVE_INSPECTOR
READONLY_TRUE_PROPERTY(target, "hasInspector");
#else
READONLY_FALSE_PROPERTY(target, "hasInspector");
#endif

if (env->abort_on_uncaught_exception())
READONLY_TRUE_PROPERTY(target, "shouldAbortOnUncaughtException");

Expand Down
7 changes: 0 additions & 7 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,12 +622,6 @@ function skipIfInspectorDisabled() {
}
}

function skipIfInspectorEnabled() {
if (process.features.inspector) {
skip('V8 inspector is enabled');
}
}

function skipIfReportDisabled() {
if (!process.config.variables.node_report) {
skip('Node Report is disabled');
Expand Down Expand Up @@ -759,7 +753,6 @@ module.exports = {
skipIf32Bits,
skipIfEslintMissing,
skipIfInspectorDisabled,
skipIfInspectorEnabled,
skipIfReportDisabled,
skipIfWorker,

Expand Down
4 changes: 3 additions & 1 deletion test/sequential/test-inspector-has-inspector-false.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

const common = require('../common');

common.skipIfInspectorEnabled();
if (process.features.inspector) {
common.skip('V8 inspector is enabled');
}

const inspector = require('internal/util/inspector');

Expand Down