+
Skip to content

Conversation

samuelmaddock
Copy link
Member

@samuelmaddock samuelmaddock commented Jul 10, 2025

Description of Change

Follow up to #47616
Depends on #47850

Replaces webFrame.routingId and webFrame.findFrameByRoutingId() with internal synchronous IPC implementations. This allows us to avoid immediate breaking changes and allows application developers time to upgrade.

Checklist

Release Notes

Notes: none

): Electron.WebFrame | null {
findFrameByRoutingIdDeprecated();
const frameToken = ipcRendererUtils.invokeSync<string | undefined>(
IPC_MESSAGES.BROWSER_GET_FRAME_TOKEN_SYNC,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It hadn't occurred to me that this workaround would require one roundtrip to get the routingId, and then a second roundtrip to convert it right back into a frame token 😅

That said, this still seems like the best way to give apps more time to migrate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only one roundtrip so it's not too bad! FindFrameByToken only looks within the current renderer process afaik. If the frame is in another process, it won't be returned from the WebFrame API.

content::RenderFrame* render_frame =
content::RenderFrame::FromWebFrame(web_frame);
if (render_frame)
return WebFrameRenderer::Create(isolate, render_frame).ToV8();

@codebytere codebytere force-pushed the roller/chromium/main branch from 3da63d1 to b61f468 Compare July 11, 2025 13:33
@samuelmaddock
Copy link
Member Author

I'll wait for the roll to be merged before fixing up this PR.

@codebytere codebytere force-pushed the roller/chromium/main branch from 4db9fea to d3690a9 Compare July 14, 2025 09:36
Base automatically changed from roller/chromium/main to main July 14, 2025 20:42
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jul 17, 2025
@samuelmaddock samuelmaddock force-pushed the feat/sync-routing-id branch 2 times, most recently from dd92508 to 18c2fdd Compare July 21, 2025 19:29
@samuelmaddock samuelmaddock changed the base branch from main to feat/wfm-fromframetoken July 21, 2025 19:30
@samuelmaddock samuelmaddock marked this pull request as ready for review July 21, 2025 22:39
@samuelmaddock samuelmaddock requested a review from a team as a code owner July 21, 2025 22:39
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jul 21, 2025
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jul 22, 2025
Base automatically changed from feat/wfm-fromframetoken to main July 31, 2025 20:41
@samuelmaddock samuelmaddock force-pushed the feat/sync-routing-id branch from 18c2fdd to 3bd7805 Compare July 31, 2025 22:14
@samuelmaddock samuelmaddock added the target/38-x-y PR should also be added to the "38-x-y" branch. label Aug 1, 2025
@samuelmaddock samuelmaddock merged commit bdaf3b9 into main Aug 2, 2025
99 of 101 checks passed
@samuelmaddock samuelmaddock deleted the feat/sync-routing-id branch August 2, 2025 15:00
@release-clerk
Copy link

release-clerk bot commented Aug 2, 2025

No Release Notes

@trop
Copy link
Contributor

trop bot commented Aug 2, 2025

I have automatically backported this PR to "38-x-y", please check out #47941

@trop trop bot added in-flight/38-x-y merged/38-x-y PR was merged to the "38-x-y" branch. and removed target/38-x-y PR should also be added to the "38-x-y" branch. in-flight/38-x-y labels Aug 2, 2025
kigh-ota pushed a commit to kigh-ota/electron that referenced this pull request Sep 30, 2025
* refactor: replace webFrame.routingId with sync IPC

* fix: GetConstructor missing isolate

* fix: missing isolate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/38-x-y PR was merged to the "38-x-y" branch. semver/none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载