Skip to content

perf: send to the main frame without crossing the boundary twice (44-x-y) - #54214

Merged
MarshallOfSound merged 1 commit into
44-x-yfrom
bp/44-x-y/send-one-crossing
Sep 23, 2026
Merged

MarshallOfSound merged 1 commit into
44-x-yfrom
bp/44-x-y/send-one-crossing

Conversation

@MarshallOfSound

Copy link
Copy Markdown
Member

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.

(cherry picked from commit b2aaf88)
@MarshallOfSound
MarshallOfSound merged commit b512aa4 into 44-x-y Sep 23, 2026
103 checks passed
@MarshallOfSound
MarshallOfSound deleted the bp/44-x-y/send-one-crossing branch September 23, 2026 21:25
@release-clerk

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

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants