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-26 23:03:27 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2019-03-30 06:37:21 +0300
commit7aad63ba349d7b9b0eda4149d236ee66e5a26401 (patch)
tree7f6f08393640e77001b97948227ce1da6b33c848 /src/inspector_agent.cc
parent58bf61524df078ed2563725aa5e982bed51a4853 (diff)
src: do not call into JS in the maxAsyncCallStackDepthChanged interrupt
If Debugger.setAsyncCallStackDepth is sent during bootstrap, we cannot immediately call into JS to enable the hooks, which could interrupt the JS execution of bootstrap. So instead we save the notification in the inspector agent if it's sent in the middle of bootstrap, and process the notification later here. Refs: https://github.com/nodejs/node/issues/26798 PR-URL: https://github.com/nodejs/node/pull/26935 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Diffstat (limited to 'src/inspector_agent.cc')
-rw-r--r--src/inspector_agent.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc
index 90ed2857815..91a57b9944e 100644
--- a/src/inspector_agent.cc
+++ b/src/inspector_agent.cc
@@ -835,6 +835,7 @@ void Agent::DisableAsyncHook() {
void Agent::ToggleAsyncHook(Isolate* isolate,
const node::Persistent<Function>& fn) {
+ CHECK(parent_env_->has_run_bootstrapping_code());
HandleScope handle_scope(isolate);
CHECK(!fn.IsEmpty());
auto context = parent_env_->context();