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

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

Issue 1417953002: PlzNavigate: Add tests to check WebUI navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor update. Created 5 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 612868ecc20d6f8dde95c092e9849d5acc81b5fd..bfbe454ae480690315739f8660d59b4e8b79252b 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -1000,7 +1000,10 @@ RenderFrameHostImpl* RenderFrameHostManager::GetFrameHostForNavigation(
// Reuse the current RFH if its SiteInstance matches the the navigation's
// or if this is a subframe navigation. We only swap RFHs for subframes when
// --site-per-process is enabled.
- CleanUpNavigation();
+
+ if (speculative_render_frame_host_)
+ DiscardUnusedFrame(UnsetSpeculativeRenderFrameHost());
+
navigation_rfh = render_frame_host_.get();
// As SiteInstances are the same, make the RFH update its possible pending
@@ -1092,8 +1095,6 @@ RenderFrameHostImpl* RenderFrameHostManager::GetFrameHostForNavigation(
void RenderFrameHostManager::CleanUpNavigation() {
CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation));
- // TODO(carlosk): the discarding of the current RFH WebUI and the cleanup of
- // the speculative RFH should not always happen together.
render_frame_host_->DiscardPendingWebUI();
if (speculative_render_frame_host_)
DiscardUnusedFrame(UnsetSpeculativeRenderFrameHost());

Powered by Google App Engine
This is Rietveld 408576698