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

Fixes #7742: src: --inspect notify contextDestroyed #7756

Closed
wants to merge 1 commit into from
Closed

Fixes #7742: src: --inspect notify contextDestroyed #7756

wants to merge 1 commit into from

Conversation

nojvek
Copy link

@nojvek nojvek commented Jul 15, 2016

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

inspector

Description of change

When node --inspect is run, Runtime.contextDestroyed is fired before debugger goes into a wait loop.

This signals the client that it can stop any profilers if they were running and disconnect

/cc @ofrobots @pavelfeldman

I'm not familiar with v8 internals. What is the best way for V8Inspector to hold a context reference so it gets nicely garbage collected ?

I tried using a v8::Localv8::Context* but that didn't work.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol labels Jul 15, 2016
@bnoordhuis
Copy link
Member

Note also that the commit log should confirm to the guidelines from CONTRIBUTING.md.

@nojvek
Copy link
Author

nojvek commented Jul 16, 2016

  1. The first line should be 50 characters or less and contain a short
    description of the change prefixed with the name of the changed subsystem
    (e.g. "net: add localAddress and localPort to Socket").

Got it.

I'll change the format.

On Saturday, July 16, 2016, Ben Noordhuis notifications@github.com wrote:

Note also that the commit log should confirm to the guidelines from
CONTRIBUTING.md.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#7756 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA-JVJsoEjsCRFcDSLUVDeMlaVbzuryKks5qWJumgaJpZM4JNz9x
.

@nojvek
Copy link
Author

nojvek commented Jul 27, 2016

@pavelfeldman / @ofrobots ,

It seems the v8inspector update from blink landed today but it doesn't have the notifyContextDestroyed.

Do you want me to send a patch to chromium repo ?

How often do you bring changes from chromium down to nodejs ?

@pavelfeldman
Copy link
Contributor

We should now land change to V8Inspector (if that is still necessary) into
chromium and follow-up in node.

On Wed, Jul 27, 2016 at 10:32 AM, Manoj Patel notifications@github.com
wrote:

@pavelfeldman https://github.com/pavelfeldman / @ofrobots
https://github.com/ofrobots ,

It seems the v8inspector update from blink landed today but it doesn't
have the notifyContextDestroyed.

Do you want me to send a patch to chromium repo ?

Not sure when you plan next to bring minor updates back to nodejs repo ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7756 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA19BcRB3Akl8Pki803NMxT59DaieGsbks5qZ5YzgaJpZM4JNz9x
.

@nojvek
Copy link
Author

nojvek commented Jul 27, 2016

Okay I'll send a patch to chromium tonight.

On Wed, Jul 27, 2016 at 10:38 AM, Pavel Feldman notifications@github.com
wrote:

We should now land change to V8Inspector (if that is still necessary) into
chromium and follow-up in node.

On Wed, Jul 27, 2016 at 10:32 AM, Manoj Patel notifications@github.com
wrote:

@pavelfeldman https://github.com/pavelfeldman / @ofrobots
https://github.com/ofrobots ,

It seems the v8inspector update from blink landed today but it doesn't
have the notifyContextDestroyed.

Do you want me to send a patch to chromium repo ?

Not sure when you plan next to bring minor updates back to nodejs repo ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7756 (comment), or
mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AA19BcRB3Akl8Pki803NMxT59DaieGsbks5qZ5YzgaJpZM4JNz9x

.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#7756 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA-JVGV7U1mXh_XAfpt5oqPhqIZJ-sSlks5qZ5eNgaJpZM4JNz9x
.

When node script execution finishes, inspector sends
Runtime.contextDestroyed event over websocket.

V8Inspector changes will be also sent to chromium repo.
@nojvek nojvek changed the title Fixes #7742: node --inspect should fire Runtime.executionContextDestoyed when script finishes executing Fixes #7742: src: --inspector notify contextDestroyed Jul 28, 2016
@nojvek nojvek changed the title Fixes #7742: src: --inspector notify contextDestroyed Fixes #7742: src: --inspect notify contextDestroyed Jul 28, 2016
@nojvek
Copy link
Author

nojvek commented Jul 28, 2016

@nojvek
Copy link
Author

nojvek commented Jul 28, 2016

Landed in chromium.

@pavelfeldman, when do you expect v8 to land in nodejs next?

Regards.

@pavelfeldman
Copy link
Contributor

@eugeneo, @ofrobots should we roll weekly?

@ofrobots
Copy link
Contributor

Weekly sounds like a good cadence to start with; we can adjust as we go. The rolling process is actually quite simple (collaboration welcome):

@nojvek
Copy link
Author

nojvek commented Jul 29, 2016

I'm not sure If I fully understand the process.

Is the pavelfeldman/v8_inspector automatically updated from chromium
sources nightly ?

I know https://github.com/ChromeDevTools/devtools-frontend is a mirror of a
chromium branch. Should pfeldman/v8_inspector be something similar?

The PR to update deps/v8_inspector is basically a diff with the chromium
repo right?

Regards.

On Fri, Jul 29, 2016 at 9:34 AM, Ali Ijaz Sheikh notifications@github.com
wrote:

Weekly sounds like a good cadence to start with; we can adjust as we go.
The rolling process is actually quite simple (collaboration welcome):


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#7756 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA-JVOUdo_9anC0vNDXGCtUJOkrZA46Mks5qaiurgaJpZM4JNz9x
.

@pavelfeldman
Copy link
Contributor

There is no process yet, we are talking about establishing it...

@ofrobots
Copy link
Contributor

ofrobots commented Aug 8, 2016

#8014

@nojvek
Copy link
Author

nojvek commented Oct 20, 2016

This has been open for a while and it seems V8Inspector.cpp is moved. I'll update the PR again.

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Mar 1, 2017
@jasnell
Copy link
Member

jasnell commented Mar 1, 2017

@nodejs/v8-inspector ... is this still necessary?

@eugeneo
Copy link
Contributor

eugeneo commented Mar 1, 2017 via email

@nojvek
Copy link
Author

nojvek commented Mar 1, 2017 via email

@jasnell
Copy link
Member

jasnell commented Mar 1, 2017

Ok, will keep this open then.

@auchenberg
Copy link

Has this landed with the recent V8_inspector upgrades?

@eugeneo
Copy link
Contributor

eugeneo commented Apr 6, 2017

Not yet. Will need to be rebased/redone.

@nojvek
Copy link
Author

nojvek commented May 3, 2017

@eugeneo any updates on this?

@eugeneo
Copy link
Contributor

eugeneo commented May 3, 2017

@nojvek I created a new PR (#12814) as I don't think I can contribute to this PR.

@nojvek
Copy link
Author

nojvek commented May 3, 2017

Closing since @eugeneo has a newer PR that fixes this.

@nojvek nojvek closed this May 3, 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>
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 stalled Issues and PRs that are stalled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants