Skip to content

perf: push preload paths to Node.js renderers instead of a sync IPC at startup - #53915

Merged
MarshallOfSound merged 2 commits into
44-x-yfrom
trop/44-x-y-bp-perf-push-preload-paths-to-node-js-renderers-instead-of-a-sync-ipc-at-startup-1789409543052
Sep 15, 2026
Merged

MarshallOfSound merged 2 commits into
44-x-yfrom
trop/44-x-y-bp-perf-push-preload-paths-to-node-js-renderers-instead-of-a-sync-ipc-at-startup-1789409543052

Conversation

@trop

@trop trop Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Backport of #53860

See that PR for details.

Notes: none

…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.

Co-authored-by: Sam Attard <[email protected]>
@trop
trop Bot requested a review from a team as a code owner September 14, 2026 18:12
@trop
trop Bot requested a review from MarshallOfSound September 14, 2026 18:12
@trop trop Bot added 44-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Sep 14, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) September 14, 2026 18:14
The backported renderer_startup_data::IsFrameInSandboxedRenderer() asks
ElectronBrowserClient::IsRendererProcessSandboxed() which renderer client a
frame's process runs, but that helper only exists on main (added in #52472).
Bring over just the bookkeeping part: remember whether --no-sandbox was on
the command line each renderer process was launched with, and forget it when
the RenderProcessHost is destroyed.
@MarshallOfSound
MarshallOfSound merged commit 8dbc0a0 into 44-x-y Sep 15, 2026
71 checks passed
@MarshallOfSound
MarshallOfSound deleted the trop/44-x-y-bp-perf-push-preload-paths-to-node-js-renderers-instead-of-a-sync-ipc-at-startup-1789409543052 branch September 15, 2026 00:41
@release-clerk

release-clerk Bot commented Sep 15, 2026

Copy link
Copy Markdown

No Release Notes

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

Labels

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

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants