Skip to content

perf: send to the main frame without crossing the boundary twice - #54212

Merged
MarshallOfSound merged 1 commit into
45-x-yfrom
trop/45-x-y-bp-perf-send-to-the-main-frame-without-crossing-the-boundary-twice-1790102921147
Sep 22, 2026
Merged

MarshallOfSound merged 1 commit into
45-x-yfrom
trop/45-x-y-bp-perf-send-to-the-main-frame-without-crossing-the-boundary-twice-1790102921147

Conversation

@trop

@trop trop Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Backport of #54209

See that PR for details.

Notes: none

webContents.send() reached the frame through the mainFrame accessor, a
full call into C++ that looks up or builds a WebFrameMain wrapper, and
then made a second call to send. Resolve the primary main frame in C++
so a send crosses once. The channel check and error handling move to the
webContents wrapper unchanged: a destroyed contents or missing frame
still throws a TypeError, a serialization failure is still logged.

Saves roughly 250 ns per send on a testing build; the rest of a send is
serialization and mojo.

Co-authored-by: Sam Attard <[email protected]>
@trop
trop Bot requested a review from MarshallOfSound September 22, 2026 18:48
@trop trop Bot added 45-x-y backport This is a backport PR semver/none labels Sep 22, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) September 22, 2026 18:49
@MarshallOfSound
MarshallOfSound merged commit f6be46f into 45-x-y Sep 22, 2026
90 checks passed
@MarshallOfSound
MarshallOfSound deleted the trop/45-x-y-bp-perf-send-to-the-main-frame-without-crossing-the-boundary-twice-1790102921147 branch September 22, 2026 20:01
@release-clerk

release-clerk Bot commented Sep 22, 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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant