Skip to content

fix: skip the sandbox bundle on documents without startup data - #54176

Merged
MarshallOfSound merged 1 commit into
43-x-yfrom
trop/43-x-y-bp-fix-skip-the-sandbox-bundle-on-documents-without-startup-data-1789986198459
Sep 21, 2026
Merged

MarshallOfSound merged 1 commit into
43-x-yfrom
trop/43-x-y-bp-fix-skip-the-sandbox-bundle-on-documents-without-startup-data-1789986198459

Conversation

@trop

@trop trop Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Backport of #54155

See that PR for details.

Notes: Fixed a spurious "sandboxed_renderer.bundle.js script failed to run" console error when DevTools attached to a sandboxed frame before its first navigation.

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]>
@trop
trop Bot requested a review from MarshallOfSound September 21, 2026 10:23
@trop trop Bot added 43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Sep 21, 2026
@MarshallOfSound
MarshallOfSound merged commit 850ecf7 into 43-x-y Sep 21, 2026
91 checks passed
@MarshallOfSound
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-clerk

release-clerk Bot commented Sep 21, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a spurious "sandboxed_renderer.bundle.js script failed to run" console error when DevTools attached to a sandboxed frame before its first navigation.

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

Labels

43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant