Repository navigation
feat(ext/node): implement NodeRuntime.notifyWhenWaitingForDisconnect - #34204
Merged
Merged
Conversation
Adds the missing CDP command and emits the matching NodeRuntime.waitingForDisconnect notification at process-exit time for sessions that opted in. Sessions with the opt-in flag are skipped from the existing Runtime.executionContextDestroyed broadcast, matching Node's behavior where the two notifications are mutually exclusive per session. Clears test-inspector-waiting-for-disconnect.js, which connects two sessions to a child running with --inspect-brk, opts one of them in, and verifies that the opted-in session receives waitingForDisconnect (but not executionContextDestroyed) while the second session still sees executionContextDestroyed as before.
…ntime-notify-disconnect # Conflicts: # tests/node_compat/config.jsonc
bartlomieju
enabled auto-merge (squash)
May 18, 2026 09:05
littledivy
pushed a commit
to crowlKats/deno
that referenced
this pull request
Jun 10, 2026
…enoland#34204) Adds the missing CDP command. When a session opts in via NodeRuntime.notifyWhenWaitingForDisconnect(enabled: true), the process-exit handler now emits NodeRuntime.waitingForDisconnect to it instead of the generic Runtime.executionContextDestroyed, matching Node's behavior where the two notifications are mutually exclusive per session. Sessions that did not opt in continue to receive executionContextDestroyed as before. The wait-for-disconnect loop itself was already in place; this just plumbs the new per-session flag through the WebSocket dispatcher and splits the existing context-destroyed broadcast. Clears test-inspector-waiting-for-disconnect.js, which connects two sessions to a child running with --inspect-brk, opts one of them in, and verifies the opted-in session sees waitingForDisconnect while the other still sees executionContextDestroyed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the missing CDP command. When a session opts in via
NodeRuntime.notifyWhenWaitingForDisconnect(enabled: true), the
process-exit handler now emits NodeRuntime.waitingForDisconnect to it
instead of the generic Runtime.executionContextDestroyed, matching
Node's behavior where the two notifications are mutually exclusive per
session. Sessions that did not opt in continue to receive
executionContextDestroyed as before.
The wait-for-disconnect loop itself was already in place; this just
plumbs the new per-session flag through the WebSocket dispatcher and
splits the existing context-destroyed broadcast.
Clears test-inspector-waiting-for-disconnect.js, which connects two
sessions to a child running with --inspect-brk, opts one of them in,
and verifies the opted-in session sees waitingForDisconnect while the
other still sees executionContextDestroyed.