Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8cc9757

Browse filesBrowse files
joyeecheungaddaleax
authored andcommitted
Revert "inspector: move process.binding to internalBinding"
This reverts commit c168672. PR-URL: #25446 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 1805236 commit 8cc9757
Copy full SHA for 8cc9757

File tree

Expand file treeCollapse file tree

11 files changed

+9
-11
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

11 files changed

+9
-11
lines changed
Open diff view settings
Collapse file

‎lib/inspector.js‎

Copy file name to clipboardExpand all lines: lib/inspector.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const {
1111
} = require('internal/errors').codes;
1212
const { validateString } = require('internal/validators');
1313
const util = require('util');
14-
const { Connection, open, url } = internalBinding('inspector');
14+
const { Connection, open, url } = process.binding('inspector');
1515

1616
if (!Connection)
1717
throw new ERR_INSPECTOR_NOT_AVAILABLE();
Collapse file

‎lib/internal/bootstrap/loaders.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap/loaders.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
'fs_event_wrap',
8686
'http_parser',
8787
'icu',
88-
'inspector',
8988
'js_stream',
9089
'natives',
9190
'os',
Collapse file

‎lib/internal/inspector_async_hook.js‎

Copy file name to clipboardExpand all lines: lib/internal/inspector_async_hook.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const inspector = internalBinding('inspector');
3+
const inspector = process.binding('inspector');
44

55
if (!inspector || !inspector.asyncTaskScheduled) {
66
exports.setup = function() {};
Collapse file

‎lib/internal/modules/cjs/helpers.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/helpers.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ if (getOptionValue('--experimental-worker')) {
108108
builtinLibs.sort();
109109
}
110110

111-
if (typeof internalBinding('inspector').open === 'function') {
111+
if (typeof process.binding('inspector').open === 'function') {
112112
builtinLibs.push('inspector');
113113
builtinLibs.sort();
114114
}
Collapse file

‎lib/internal/modules/cjs/loader.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/loader.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ Module.prototype._compile = function(content, filename) {
706706
// Set breakpoint on module start
707707
if (filename === resolvedArgv) {
708708
delete process._breakFirstLine;
709-
inspectorWrapper = internalBinding('inspector').callAndPauseOnStart;
709+
inspectorWrapper = process.binding('inspector').callAndPauseOnStart;
710710
}
711711
}
712712
var dirname = path.dirname(filename);
Collapse file

‎lib/internal/modules/esm/module_job.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/esm/module_job.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class ModuleJob {
7373
try {
7474
if (this.isMain && process._breakFirstLine) {
7575
delete process._breakFirstLine;
76-
const initWrapper = internalBinding('inspector').callAndPauseOnStart;
76+
const initWrapper = process.binding('inspector').callAndPauseOnStart;
7777
initWrapper(this.module.instantiate, this.module);
7878
} else {
7979
this.module.instantiate();
Collapse file

‎lib/internal/process/coverage.js‎

Copy file name to clipboardExpand all lines: lib/internal/process/coverage.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function disableAllAsyncHooks() {
5151
exports.writeCoverage = writeCoverage;
5252

5353
function setup() {
54-
const { Connection } = internalBinding('inspector');
54+
const { Connection } = process.binding('inspector');
5555
if (!Connection) {
5656
console.warn('inspector not enabled');
5757
return;
Collapse file

‎src/inspector_js_api.cc‎

Copy file name to clipboardExpand all lines: src/inspector_js_api.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,5 +315,5 @@ void Initialize(Local<Object> target, Local<Value> unused,
315315
} // namespace inspector
316316
} // namespace node
317317

318-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(inspector,
318+
NODE_BUILTIN_MODULE_CONTEXT_AWARE(inspector,
319319
node::inspector::Initialize);
Collapse file

‎src/node.cc‎

Copy file name to clipboardExpand all lines: src/node.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2238,5 +2238,5 @@ int Start(int argc, char** argv) {
22382238
#if !HAVE_INSPECTOR
22392239
void Initialize() {}
22402240

2241-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(inspector, Initialize)
2241+
NODE_BUILTIN_MODULE_CONTEXT_AWARE(inspector, Initialize)
22422242
#endif // !HAVE_INSPECTOR
Collapse file

‎test/parallel/test-process-binding-internalbinding-whitelist.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-process-binding-internalbinding-whitelist.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ assert(process.binding('url'));
1616
assert(process.binding('spawn_sync'));
1717
assert(process.binding('js_stream'));
1818
assert(process.binding('buffer'));
19-
assert(process.binding('inspector'));
2019
assert(process.binding('os'));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.