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:
parent
83972ff6ac
commit
332032cc52
@ -273,8 +273,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,
|
||||
@ -287,7 +285,6 @@ void Initialize(Local<Object> target, Local<Value> unused,
|
||||
|
||||
env->SetMethod(
|
||||
target, "setConsoleExtensionInstaller", SetConsoleExtensionInstaller);
|
||||
if (agent->WillWaitForConnect())
|
||||
env->SetMethod(target, "callAndPauseOnStart", CallAndPauseOnStart);
|
||||
env->SetMethod(target, "open", Open);
|
||||
env->SetMethodNoSideEffect(target, "url", Url);
|
||||
|
Loading…
x
Reference in New Issue
Block a user