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:
authorBen Noordhuis <info@bnoordhuis.nl>2017-12-08 01:55:23 +0300
committerBen Noordhuis <info@bnoordhuis.nl>2017-12-09 13:54:49 +0300
commitdf79b7d8214f61df1520c15f0b44d7ef7808d345 (patch)
tree1cf64d120190c27973799d58aa9cfc1a9e79ff00 /src/inspector_agent.h
parentd865395b7d81822acbeae5e7f3b95eb3a357a37f (diff)
src: fix missing handlescope bug in inspector
Fix a regression that was introduced in commit 5886e204f0 ("inspector: track async stacks when necessary") and that I overlooked during review: the persistent handle with the callback must be rematerialized *after* the `v8::HandleScope` is created, not before. Apparently `test/sequential/test-inspector-async-call-stack.js` has no test coverage for this scenario and I'm out of good ideas on how to create a concise and reliable test case. Fixes: https://github.com/nodejs/node/issues/17496 PR-URL: https://github.com/nodejs/node/pull/17539 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'src/inspector_agent.h')
-rw-r--r--src/inspector_agent.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inspector_agent.h b/src/inspector_agent.h
index 7211f5a2a49..29b9546b514 100644
--- a/src/inspector_agent.h
+++ b/src/inspector_agent.h
@@ -96,7 +96,8 @@ class Agent {
void DisableAsyncHook();
private:
- void ToggleAsyncHook(v8::Isolate* isolate, v8::Local<v8::Function> fn);
+ void ToggleAsyncHook(v8::Isolate* isolate,
+ const v8::Persistent<v8::Function>& fn);
node::Environment* parent_env_;
std::unique_ptr<NodeInspectorClient> client_;