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
fixup! src: use internalBinding('config').hasInspector in JS land
  • Loading branch information
joyeecheung committed Jan 2, 2019
commit b249b07fb8889a091acfabc9232425d48672b2c6
2 changes: 1 addition & 1 deletion lib/internal/bootstrap/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const cannotUseCache = [

// Skip modules that cannot be required when they are not
// built into the binary.
if (hasInspector) {
if (!hasInspector) {
cannotUseCache.push(
'inspector',
'internal/util/inspector',
Expand Down
5 changes: 3 additions & 2 deletions lib/internal/process/coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ function disableAllAsyncHooks() {
exports.writeCoverage = writeCoverage;

function setup() {
const { Connection } = internalBinding('inspector');
if (!Connection) {
const { hasInspector } = internalBinding('config');
if (!hasInspector) {
process._rawDebug('inspector not enabled');
return;
}

const { Connection } = internalBinding('inspector');
coverageConnection = new Connection((res) => {
if (coverageConnection._coverageCallback) {
coverageConnection._coverageCallback(res);
Expand Down