Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1721)

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 2383773002: Prevent RFH from attempting to transfer after it's been swapped out (Closed)
Patch Set: Addressed comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 46ddfa26acfde24fcf4f5a1b1d834452f8fe95b2..f04b78fa75aa229332f83cad4013289de9e88930 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -632,6 +632,10 @@ void RenderFrameHostManager::SwapOutOldFrame(
CreateRenderFrameProxyHost(old_render_frame_host->GetSiteInstance(),
old_render_frame_host->render_view_host());
+ // Reset any NavigationHandle in the RenderFrameHost. This will prevent any
+ // ongoing navigation from attempting to transfer.
+ old_render_frame_host->SetNavigationHandle(nullptr);
+
// Tell the old RenderFrameHost to swap out and be replaced by the proxy.
old_render_frame_host->SwapOut(proxy, true);
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.cc ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698