Skip to content
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

Merged
merged 0 commits into from
May 5, 2017
Merged

inspector: report when main context is destroyed #12814

merged 0 commits into from
May 5, 2017

Conversation

eugeneo
Copy link
Contributor

@eugeneo eugeneo commented May 3, 2017

Reimplements: #7756
Fixes: #7742

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

inspector: report when the main context is done.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. dont-land-on-v4.x inspector Issues and PRs related to the V8 inspector protocol labels May 3, 2017
@@ -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);
Copy link
Member

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?

Copy link
Contributor Author

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.

@@ -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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const for name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@eugeneo eugeneo closed this May 5, 2017
@eugeneo eugeneo deleted the contextDestroyed branch May 5, 2017 18:51
@eugeneo eugeneo merged commit 15e160e into nodejs:master May 5, 2017
@eugeneo
Copy link
Contributor Author

eugeneo commented May 5, 2017

anchnk pushed a commit to anchnk/node that referenced this pull request May 6, 2017
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>
@jasnell jasnell mentioned this pull request May 11, 2017
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
@gibfahn
Copy link
Member

gibfahn commented Jun 20, 2017

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

@ianguerin
Copy link

@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?

@bnoordhuis
Copy link
Member

@ianguerin Try the latest 8.x release, v8.9.1.

@ianguerin
Copy link

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

@ianguerin
Copy link

@bnoordhuis, appears to be the exact same issue, even with node@8.9.1

@bnoordhuis
Copy link
Member

@ianguerin Can you file a new issue? Please include steps to reproduce. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

node --inspect fire Runtime.executionContextDestroyed when script finishes executing
10 participants