mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: remove CHECK_EQ for swapped RFH (#30834)
|old_host| may be nullptr if the previous RFH was shutdown. Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
This commit is contained in:
@@ -1420,12 +1420,11 @@ void WebContents::RenderFrameHostChanged(content::RenderFrameHost* old_host,
|
||||
// If an instance of WebFrameMain exists, it will need to have its RFH
|
||||
// swapped as well.
|
||||
//
|
||||
// |old_host| can be a nullptr in so we use |new_host| for looking up the
|
||||
// |old_host| can be a nullptr so we use |new_host| for looking up the
|
||||
// WebFrameMain instance.
|
||||
auto* web_frame =
|
||||
WebFrameMain::FromFrameTreeNodeId(new_host->GetFrameTreeNodeId());
|
||||
if (web_frame) {
|
||||
CHECK_EQ(web_frame->render_frame_host(), old_host);
|
||||
web_frame->UpdateRenderFrameHost(new_host);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user