Skip to content

node --inspect fire Runtime.executionContextDestroyed when script finishes executing #7742

Description

@nojvek
  • Version: Node nightly
  • Platform:
  • Subsystem:

Reported in chromium : https://bugs.chromium.org/p/chromium/issues/detail?id=628407

But it seems this needs to be fixed in node according to @pavelfeldman

This is where we should call V8Debugger::contextDestroyed
https://github.com/nodejs/node/blob/master/src/node.cc#L2178.

Activity

  1. nojvek commented on Jul 15, 2016

    @nojvek
    Author

    Would the fix be along the lines of:

    
    void AgentImpl::WaitForDisconnect() {
      shutting_down_ = true;
      fprintf(stderr, "Waiting for the debugger to disconnect...\n");
      inspector_->contextDestroyed(inspector_->rootContext);
      inspector_->runMessageLoopOnPause(0);
    }
    

    I could attempt a fix

    /cc @ofrobots

  2. added
    inspectorIssues and PRs related to the V8 inspector protocol.
    on Jul 15, 2016
  3. ofrobots commented on Jul 15, 2016

    @ofrobots
    Contributor

    Sounds good /cc @eugeneo.

  4. pavelfeldman commented on Jul 15, 2016

    @pavelfeldman
    Contributor

    Would the fix be along the lines of

    Sort of. It seems you might need to land the plumbing for the contextDestroyed into V8Inspector which is in Blink to achieve that. You can fix it in terms of Node and we'll help with the two-sided commit.

  5. nojvek commented on Jul 28, 2016

    @nojvek
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    inspectorIssues and PRs related to the V8 inspector protocol.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions