-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inspector: report when main context is destroyed #12814
Conversation
src/inspector_agent.cc
Outdated
@@ -243,6 +243,10 @@ class NodeInspectorClient : public v8_inspector::V8InspectorClient { | |||
return uv_hrtime() * 1.0 / NANOS_PER_MSEC; | |||
} | |||
|
|||
void contextDestroyed(Local<Context> context) { | |||
inspector_->contextDestroyed(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't the symmetrical thing be to call inspector_->contextDestroyed(env_->context())
from ~NodeInspectorClient
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inspector is supposed to live past the context lifetime (e.g. some tools like profiler can still work with the data it gathered).
I removed contextCreated notification from the constructor. I am trying to implement multicontext and it seems more logical if contextCreated and contextDestroyed are called from outside.
src/inspector_agent.cc
Outdated
@@ -243,6 +238,17 @@ class NodeInspectorClient : public v8_inspector::V8InspectorClient { | |||
return uv_hrtime() * 1.0 / NANOS_PER_MSEC; | |||
} | |||
|
|||
void contextCreated(Local<Context> context, std::string name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
for name
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
CI: https://ci.nodejs.org/job/node-test-pull-request/7870/ |
PR-URL: nodejs#12814 Reimplements: nodejs#7756 Fixes: nodejs#7742 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Should this be backported to |
@eugeneo, this issue is still happening when I'm debugging with node@8.4.0 and Chrome (macOS) v62.0.3202.94. I did not see it mentioned in the release proposal for 8.0.0, but this thread led me to believe it would be fixed in 8.x.x? |
@ianguerin Try the latest 8.x release, v8.9.1. |
Thank you @bnoordhuis, having some issues with node-gyp after bumping to 8.9.1. I'll update when I'm able to get things up and running again |
@bnoordhuis, appears to be the exact same issue, even with node@8.9.1 |
@ianguerin Can you file a new issue? Please include steps to reproduce. Cheers. |
Reimplements: #7756
Fixes: #7742
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
inspector: report when the main context is done.