Skip to content

Commit 332032c

Browse files
committed
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 83972ff commit 332032c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/inspector_js_api.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,6 @@ void Initialize(Local<Object> target, Local<Value> unused,
273273
Local<Context> context, void* priv) {
274274
Environment* env = Environment::GetCurrent(context);
275275

276-
Agent* agent = env->inspector_agent();
277-
278276
v8::Local<v8::Function> consoleCallFunc =
279277
env->NewFunctionTemplate(InspectorConsoleCall, v8::Local<v8::Signature>(),
280278
v8::ConstructorBehavior::kThrow,
@@ -287,8 +285,7 @@ void Initialize(Local<Object> target, Local<Value> unused,
287285

288286
env->SetMethod(
289287
target, "setConsoleExtensionInstaller", SetConsoleExtensionInstaller);
290-
if (agent->WillWaitForConnect())
291-
env->SetMethod(target, "callAndPauseOnStart", CallAndPauseOnStart);
288+
env->SetMethod(target, "callAndPauseOnStart", CallAndPauseOnStart);
292289
env->SetMethod(target, "open", Open);
293290
env->SetMethodNoSideEffect(target, "url", Url);
294291

0 commit comments

Comments
 (0)