summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-03-20 09:21:38 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-03-26 14:37:16 -0400
commit332032cc52523ebe691ff70a99b986b6f878c32b (patch)
tree917b2e2197f81ba79a9d0c6210be6c0a03a4570e /src
parent83972ff6ac0d05f3187cb3d4bec3d20325d4afbf (diff)
downloadandroid-node-v8-332032cc52523ebe691ff70a99b986b6f878c32b.tar.gz
android-node-v8-332032cc52523ebe691ff70a99b986b6f878c32b.tar.bz2
android-node-v8-332032cc52523ebe691ff70a99b986b6f878c32b.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/inspector_js_api.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc
index 0155123e83..8b55146dbe 100644
--- a/src/inspector_js_api.cc
+++ b/src/inspector_js_api.cc
@@ -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,8 +285,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);