Repository navigation
fix: skip the sandbox bundle on documents without startup data - #54176
Merged
Conversation
The browser pushes renderer startup data right before it commits a navigation, so the initial empty document of a frame whose first navigation is still pending or was cancelled never has it. A script context forced onto that document (DevTools Runtime.enable, webFrameMain.executeJavaScript) ran the sandbox bundle anyway and logged "Cannot destructure property 'preloadScripts' of 'binding.startupData' as it is null". Extension background pages and offscreen documents hit this whenever a DevTools client attached early. Return before injecting anything when the frame has no startup data; the document that commits afterwards gets its own context with the data in place. main and 45-x-y already behave this way through HasScriptsToInject() (#53974). Fixes #54149. Co-authored-by: Sam Attard <[email protected]>
5 tasks done
MarshallOfSound
approved these changes
Sep 21, 2026
MarshallOfSound
deleted the
trop/43-x-y-bp-fix-skip-the-sandbox-bundle-on-documents-without-startup-data-1789986198459
branch
September 21, 2026 16:19
|
Release Notes Persisted
|
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.
Backport of #54155
See that PR for details.
Notes: Fixed a spurious "
sandboxed_renderer.bundle.jsscript failed to run" console error when DevTools attached to a sandboxed frame before its first navigation.