Repository navigation
perf: push preload paths to Node.js renderers instead of a sync IPC at startup - #53860
Merged
Merged
Conversation
…t startup Sandboxed frames already receive their preload list from the browser over the ElectronFrameStartup channel ahead of CommitNavigation. Frames with Node.js integration still blocked on a synchronous BROWSER_NONSANDBOX_LOAD round trip into browser-process JS from renderer init to learn the same thing. The browser now pushes RendererStartupData to those frames too, with only the preload paths filled in (no file contents, environment or code cache, since Node loads the files itself): at frame creation, so a script context created on the initial empty document still sees it, and again ahead of each committed navigation. ElectronRendererClient hands the paths to renderer init and the sync IPC and its handler are removed.
MarshallOfSound
marked this pull request as ready for review
September 13, 2026 21:25
MarshallOfSound
enabled auto-merge (squash)
September 14, 2026 18:09
codebytere
approved these changes
Sep 14, 2026
|
No Release Notes |
This was referenced Sep 14, 2026
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #53915 |
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #53916 |
Contributor
|
@MarshallOfSound has manually backported this PR to "43-x-y", please check out #53927 |
MarshallOfSound
added a commit
that referenced
this pull request
Sep 15, 2026
…t startup (43-x-y) (#53927) perf: push preload paths to Node.js renderers instead of a sync IPC at startup (#53860) Sandboxed frames already receive their preload list from the browser over the ElectronFrameStartup channel ahead of CommitNavigation. Frames with Node.js integration still blocked on a synchronous BROWSER_NONSANDBOX_LOAD round trip into browser-process JS from renderer init to learn the same thing. The browser now pushes RendererStartupData to those frames too, with only the preload paths filled in (no file contents, environment or code cache, since Node loads the files itself): at frame creation, so a script context created on the initial empty document still sees it, and again ahead of each committed navigation. ElectronRendererClient hands the paths to renderer init and the sync IPC and its handler are removed. (cherry picked from commit a36f9cd) 43-x-y does not have ElectronBrowserClient::IsRendererProcessSandboxed(), which renderer_startup_data::IsFrameInSandboxedRenderer() uses, so this also carries that small helper (record whether each renderer process was launched with --no-sandbox) from #52472.
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.
Description of Change
Renderers with
sandbox: falsestill fetched their preload list from browser-process JS with a synchronousBROWSER_NONSANDBOX_LOADIPC during renderer init. The browser now pushesRendererStartupDatato those frames as it already does for sandboxed ones (paths only, no file contents or environment), at frame creation and ahead of each committed navigation, and the sync IPC and its handler are removed.Release build, Linux x64, median over 3 runs of 14 windows each:
sandbox: falsewindow, first navigation, preload startChecklist
npm testpassesRelease Notes
Notes: none