mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
Revert "inspector: move process.binding to internalBinding"
This reverts commit c168672158.
PR-URL: https://github.com/nodejs/node/pull/25446
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
18052364ce
commit
8cc97571a4
11 files changed
+9
-11
No files matched your search
+1
-1
@@ -11,7 +11,7 @@ const {
|
||||
} = require('internal/errors').codes;
|
||||
const { validateString } = require('internal/validators');
|
||||
const util = require('util');
|
||||
const { Connection, open, url } = internalBinding('inspector');
|
||||
const { Connection, open, url } = process.binding('inspector');
|
||||
|
||||
if (!Connection)
|
||||
throw new ERR_INSPECTOR_NOT_AVAILABLE();
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
'fs_event_wrap',
|
||||
'http_parser',
|
||||
'icu',
|
||||
'inspector',
|
||||
'js_stream',
|
||||
'natives',
|
||||
'os',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const inspector = internalBinding('inspector');
|
||||
const inspector = process.binding('inspector');
|
||||
|
||||
if (!inspector || !inspector.asyncTaskScheduled) {
|
||||
exports.setup = function() {};
|
||||
|
||||
@@ -108,7 +108,7 @@ if (getOptionValue('--experimental-worker')) {
|
||||
builtinLibs.sort();
|
||||
}
|
||||
|
||||
if (typeof internalBinding('inspector').open === 'function') {
|
||||
if (typeof process.binding('inspector').open === 'function') {
|
||||
builtinLibs.push('inspector');
|
||||
builtinLibs.sort();
|
||||
}
|
||||
|
||||
@@ -706,7 +706,7 @@ Module.prototype._compile = function(content, filename) {
|
||||
// Set breakpoint on module start
|
||||
if (filename === resolvedArgv) {
|
||||
delete process._breakFirstLine;
|
||||
inspectorWrapper = internalBinding('inspector').callAndPauseOnStart;
|
||||
inspectorWrapper = process.binding('inspector').callAndPauseOnStart;
|
||||
}
|
||||
}
|
||||
var dirname = path.dirname(filename);
|
||||
|
||||
@@ -73,7 +73,7 @@ class ModuleJob {
|
||||
try {
|
||||
if (this.isMain && process._breakFirstLine) {
|
||||
delete process._breakFirstLine;
|
||||
const initWrapper = internalBinding('inspector').callAndPauseOnStart;
|
||||
const initWrapper = process.binding('inspector').callAndPauseOnStart;
|
||||
initWrapper(this.module.instantiate, this.module);
|
||||
} else {
|
||||
this.module.instantiate();
|
||||
|
||||
@@ -51,7 +51,7 @@ function disableAllAsyncHooks() {
|
||||
exports.writeCoverage = writeCoverage;
|
||||
|
||||
function setup() {
|
||||
const { Connection } = internalBinding('inspector');
|
||||
const { Connection } = process.binding('inspector');
|
||||
if (!Connection) {
|
||||
console.warn('inspector not enabled');
|
||||
return;
|
||||
|
||||
@@ -315,5 +315,5 @@ void Initialize(Local<Object> target, Local<Value> unused,
|
||||
} // namespace inspector
|
||||
} // namespace node
|
||||
|
||||
NODE_MODULE_CONTEXT_AWARE_INTERNAL(inspector,
|
||||
NODE_BUILTIN_MODULE_CONTEXT_AWARE(inspector,
|
||||
node::inspector::Initialize);
|
||||
+1
-1
@@ -2238,5 +2238,5 @@ int Start(int argc, char** argv) {
|
||||
#if !HAVE_INSPECTOR
|
||||
void Initialize() {}
|
||||
|
||||
NODE_MODULE_CONTEXT_AWARE_INTERNAL(inspector, Initialize)
|
||||
NODE_BUILTIN_MODULE_CONTEXT_AWARE(inspector, Initialize)
|
||||
#endif // !HAVE_INSPECTOR
|
||||
@@ -16,5 +16,4 @@ assert(process.binding('url'));
|
||||
assert(process.binding('spawn_sync'));
|
||||
assert(process.binding('js_stream'));
|
||||
assert(process.binding('buffer'));
|
||||
assert(process.binding('inspector'));
|
||||
assert(process.binding('os'));
|
||||
@@ -291,7 +291,7 @@ if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check
|
||||
|
||||
if (process.config.variables.v8_enable_inspector !== 0 &&
|
||||
common.isMainThread) {
|
||||
const binding = internalBinding('inspector');
|
||||
const binding = process.binding('inspector');
|
||||
const handle = new binding.Connection(() => {});
|
||||
testInitialized(handle, 'Connection');
|
||||
handle.disconnect();
|
||||
|
||||
Reference in new issue
Block a user