Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-03-20 04:21:38 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2019-03-26 21:37:16 +0300
commit332032cc52523ebe691ff70a99b986b6f878c32b (patch)
tree917b2e2197f81ba79a9d0c6210be6c0a03a4570e /src/inspector_js_api.cc
parent83972ff6ac0d05f3187cb3d4bec3d20325d4afbf (diff)
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/inspector_js_api.cc')
-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 0155123e831..8b55146dbe5 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);