| 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());
|
|
|