Chromium Code Reviews| 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 d697e186d0c4dae004a901635c31d549514bffb9..33ef7fd8ac51ccccd0e5df51beb6785422e05e86 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager.cc |
| @@ -468,10 +468,14 @@ void RenderFrameHostManager::DidNavigateMainFrame( |
| // The pending cross-site navigation completed, so show the renderer. |
| // If it committed without sending network requests (e.g., data URLs), |
| // then we still need to swap out the old RFH first and run its unload |
| - // handler. OK for that to happen in the background. |
| + // handler. OK for that to happen in the background, only if it hasn't |
| + // happened yet. |
|
Charlie Reis
2014/03/21 21:35:13
Please move "if it hasn't happened yet" to the end
nasko
2014/03/24 17:48:11
Done.
|
| if (pending_render_frame_host_->render_view_host()-> |
| - HasPendingCrossSiteRequest()) |
| + HasPendingCrossSiteRequest() && |
| + pending_render_frame_host_->render_view_host()->rvh_state() != |
| + RenderViewHostImpl::STATE_WAITING_FOR_COMMIT) { |
|
Charlie Reis
2014/03/21 21:35:13
What if it were STATE_WAITING_FOR_UNLOAD_ACK? Tha
nasko
2014/03/24 17:48:11
Done.
|
| SwapOutOldPage(); |
| + } |
| CommitPending(); |
| cross_navigation_pending_ = false; |