| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d8ba520 commit 445ba9f
12 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ const { | |||
| 11 | 11 | } = require('internal/errors').codes; | |
| 12 | 12 | const { validateString } = require('internal/validators'); | |
| 13 | 13 | const util = require('util'); | |
| 14 | - const { Connection, open, url } = process.binding('inspector'); | ||
| 14 | + const { Connection, open, url } = internalBinding('inspector'); | ||
| 15 | 15 | ||
| 16 | 16 | if (!Connection) | |
| 17 | 17 | throw new ERR_INSPECTOR_NOT_AVAILABLE(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,6 +90,7 @@ const internalBindingWhitelist = [ | |||
| 90 | 90 | 'fs_event_wrap', | |
| 91 | 91 | 'http_parser', | |
| 92 | 92 | 'icu', | |
| 93 | + 'inspector', | ||
| 93 | 94 | 'js_stream', | |
| 94 | 95 | 'natives', | |
| 95 | 96 | 'pipe_wrap', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ const path = require('path'); | |||
| 4 | 4 | const CJSModule = require('internal/modules/cjs/loader'); | |
| 5 | 5 | const { makeRequireFunction } = require('internal/modules/cjs/helpers'); | |
| 6 | 6 | const { tryGetCwd } = require('internal/util'); | |
| 7 | - const { addCommandLineAPI, consoleCall } = process.binding('inspector'); | ||
| 7 | + const { addCommandLineAPI, consoleCall } = internalBinding('inspector'); | ||
| 8 | 8 | ||
| 9 | 9 | // Wrap a console implemented by Node.js with features from the VM inspector | |
| 10 | 10 | function addInspectorApis(consoleFromNode, consoleFromVM) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | - const inspector = process.binding('inspector'); | ||
| 3 | + const inspector = internalBinding('inspector'); | ||
| 4 | 4 | ||
| 5 | 5 | if (!inspector || !inspector.asyncTaskScheduled) { | |
| 6 | 6 | exports.setup = function() {}; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -108,7 +108,7 @@ if (getOptionValue('--experimental-worker')) { | |||
| 108 | 108 | builtinLibs.sort(); | |
| 109 | 109 | } | |
| 110 | 110 | ||
| 111 | - if (typeof process.binding('inspector').open === 'function') { | ||
| 111 | + if (typeof internalBinding('inspector').open === 'function') { | ||
| 112 | 112 | builtinLibs.push('inspector'); | |
| 113 | 113 | builtinLibs.sort(); | |
| 114 | 114 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -706,7 +706,7 @@ Module.prototype._compile = function(content, filename) { | |||
| 706 | 706 | // Set breakpoint on module start | |
| 707 | 707 | if (filename === resolvedArgv) { | |
| 708 | 708 | delete process._breakFirstLine; | |
| 709 | - inspectorWrapper = process.binding('inspector').callAndPauseOnStart; | ||
| 709 | + inspectorWrapper = internalBinding('inspector').callAndPauseOnStart; | ||
| 710 | 710 | } | |
| 711 | 711 | } | |
| 712 | 712 | var dirname = path.dirname(filename); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,7 +73,7 @@ class ModuleJob { | |||
| 73 | 73 | try { | |
| 74 | 74 | if (this.isMain && process._breakFirstLine) { | |
| 75 | 75 | delete process._breakFirstLine; | |
| 76 | - const initWrapper = process.binding('inspector').callAndPauseOnStart; | ||
| 76 | + const initWrapper = internalBinding('inspector').callAndPauseOnStart; | ||
| 77 | 77 | initWrapper(this.module.instantiate, this.module); | |
| 78 | 78 | } else { | |
| 79 | 79 | this.module.instantiate(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -51,7 +51,7 @@ function disableAllAsyncHooks() { | |||
| 51 | 51 | exports.writeCoverage = writeCoverage; | |
| 52 | 52 | ||
| 53 | 53 | function setup() { | |
| 54 | - const { Connection } = process.binding('inspector'); | ||
| 54 | + const { Connection } = internalBinding('inspector'); | ||
| 55 | 55 | if (!Connection) { | |
| 56 | 56 | console.warn('inspector not enabled'); | |
| 57 | 57 | return; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -315,5 +315,5 @@ void Initialize(Local<Object> target, Local<Value> unused, | |||
| 315 | 315 | } // namespace inspector | |
| 316 | 316 | } // namespace node | |
| 317 | 317 | ||
| 318 | - NODE_BUILTIN_MODULE_CONTEXT_AWARE(inspector, | ||
| 318 | + NODE_MODULE_CONTEXT_AWARE_INTERNAL(inspector, | ||
| 319 | 319 | node::inspector::Initialize); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2138,5 +2138,5 @@ int Start(int argc, char** argv) { | |||
| 2138 | 2138 | #if !HAVE_INSPECTOR | |
| 2139 | 2139 | void Initialize() {} | |
| 2140 | 2140 | ||
| 2141 | - NODE_BUILTIN_MODULE_CONTEXT_AWARE(inspector, Initialize) | ||
| 2141 | + NODE_MODULE_CONTEXT_AWARE_INTERNAL(inspector, Initialize) | ||
| 2142 | 2142 | #endif // !HAVE_INSPECTOR | |
| Back | FazBrowse Home | New Git URL |
0 commit comments