Skip to content

Commit 3574b62

Browse files
joyeecheungtargos
authored andcommitted
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: #26793 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent d80cd50 commit 3574b62

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/inspector_js_api.cc

+1-4
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ void Initialize(Local<Object> target, Local<Value> unused,
271271
Local<Context> context, void* priv) {
272272
Environment* env = Environment::GetCurrent(context);
273273

274-
Agent* agent = env->inspector_agent();
275-
276274
v8::Local<v8::Function> consoleCallFunc =
277275
env->NewFunctionTemplate(InspectorConsoleCall, v8::Local<v8::Signature>(),
278276
v8::ConstructorBehavior::kThrow,
@@ -285,8 +283,7 @@ void Initialize(Local<Object> target, Local<Value> unused,
285283

286284
env->SetMethod(
287285
target, "setConsoleExtensionInstaller", SetConsoleExtensionInstaller);
288-
if (agent->WillWaitForConnect())
289-
env->SetMethod(target, "callAndPauseOnStart", CallAndPauseOnStart);
286+
env->SetMethod(target, "callAndPauseOnStart", CallAndPauseOnStart);
290287
env->SetMethod(target, "open", Open);
291288
env->SetMethodNoSideEffect(target, "url", Url);
292289

0 commit comments

Comments
 (0)