mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
inspector: always set process.binding('inspector').callAndPauseOnStart
Since `process.binding('inspector')` is loaded during bootstrap,
simply set `process.binding('inspector').callAndPauseOnStart`
unconditionally instead of relying on `agent->WillWaitForConnect()`
which depends on runtime states,
PR-URL: https://github.com/nodejs/node/pull/26793
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
1 parent
d80cd50dbc
commit
3574b62717
1 file changed
+1
-4
@@ -271,8 +271,6 @@ void Initialize(Local<Object> target, Local<Value> unused,
|
||||
Local<Context> context, void* priv) {
|
||||
Environment* env = Environment::GetCurrent(context);
|
||||
|
||||
Agent* agent = env->inspector_agent();
|
||||
|
||||
v8::Local<v8::Function> consoleCallFunc =
|
||||
env->NewFunctionTemplate(InspectorConsoleCall, v8::Local<v8::Signature>(),
|
||||
v8::ConstructorBehavior::kThrow,
|
||||
@@ -285,8 +283,7 @@ void Initialize(Local<Object> target, Local<Value> unused,
|
||||
|
||||
env->SetMethod(
|
||||
target, "setConsoleExtensionInstaller", SetConsoleExtensionInstaller);
|
||||
if (agent->WillWaitForConnect())
|
||||
env->SetMethod(target, "callAndPauseOnStart", CallAndPauseOnStart);
|
||||
env->SetMethod(target, "callAndPauseOnStart", CallAndPauseOnStart);
|
||||
env->SetMethod(target, "open", Open);
|
||||
env->SetMethodNoSideEffect(target, "url", Url);
|
||||
|
||||
|
||||
Reference in new issue
Block a user