From 3acaab7f5e2c4bdfa3009cbb3fd64fa411bf9e28 Mon Sep 17 00:00:00 2001 From: samuelmaddock Date: Mon, 23 Aug 2021 22:28:54 -0400 Subject: [PATCH] fix: remove CHECK_EQ for swapped RFH |old_host| may be nullptr if the previous RFH was shutdown. --- shell/browser/api/electron_api_web_contents.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index e2fc303372519..415794f5bb6c2 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -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); } }