inspector: defer JS execution from V8 interrupts - #65397
Open
deepak1556 wants to merge 3 commits into
Open
Conversation
Collaborator
|
Review requested:
|
Inspector messages for a main thread connection are dispatched from a V8 interrupt handler. Defer frontend messages in this case using a microtask. This preserves the existing timing contract for main thread inspector connections, where notifications are observable after a microtask checkpoint. Starting the inspector I/O thread and toggling network tracking can also call into JS from an interrupt. Signed-off-by: deepak1556 <hop2deep@gmail.com>
Signed-off-by: deepak1556 <hop2deep@gmail.com>
Original commit message:
[api] Prepare DisallowJavascriptExecution scope around api callbacks
In `v8::Isolate::RequestInterrupt` the API contract says:
API interrupt callbacks are forbidden from executing JavaScript
on the interrupted Isolate.
This CL prepares the infrastructure to enforce this contract.
Bug: 540137721, 40067940
TAG=agy
CONV=78573798-a951-4bd3-9c6f-3e3b6775da4b
Change-Id: I43cc83c3cc3ebd34052a927dde55bbf4d49d2d29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8173727
Auto-Submit: Olivier Flückiger <olivf@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#109086}
Refs: v8/v8@b36cf9f
Signed-off-by: deepak1556 <hop2deep@gmail.com>
deepak1556
force-pushed
the
robo/enable_js_in_api_interrupt_check
branch
from
August 19, 2026 08:31
e9d757c to
788c38a
Compare
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.
Followup to #65028 covering additional callsites, upstreaming from electron/electron#52960.
Backported the V8 feature to enable the scope check moving forward,
node::RequestInterruptalready subjected this restriction with its scope check. The change should only affect addons that were to usev8::Isolate::RequestInterrupt, but its already a documented caution in the public header. Any reason the feature shouldn't be enabled ?cc @joyeecheung