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

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

Issue 789643005: PlzNavigate: make content unit tests work with browser side navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancel-navigations
Patch Set: Now addressing failures due to speculative RFH Created 5 years, 11 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 b2ddeb852a9ac7690efbee40424f1c3967825030..b1cf2a2f0b1d9e5e0a8946a2f3a3b62e91f76c60 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -280,7 +280,7 @@ bool RenderFrameHostManager::ShouldCloseTabOnUnresponsiveRenderer() {
// If the tab becomes unresponsive during beforeunload while doing a
// cross-site navigation, proceed with the navigation. (This assumes that
// the pending RenderFrameHost is still responsive.)
- if (render_frame_host_->is_waiting_for_beforeunload_ack()) {
+ if (render_frame_host_->IsWaitingForBeforeUnloadACK()) {
// Haven't gotten around to starting the request, because we're still
// waiting for the beforeunload handler to finish. We'll pretend that it
// did finish, to let the navigation proceed. Note that there's a danger
@@ -432,6 +432,7 @@ void RenderFrameHostManager::DidNavigateFrame(
switches::kEnableBrowserSideNavigation)) {
if (render_frame_host == speculative_render_frame_host_.get()) {
CommitPending();
+ cross_navigation_pending_ = false;
nasko 2015/01/21 00:41:32 Shouldn't this flag be cleared in CommitPending it
clamy 2015/01/21 13:22:11 Done.
} else if (render_frame_host == render_frame_host_.get()) {
// TODO(carlosk): this code doesn't properly handle in-page navigation or
// interwoven navigation requests.
@@ -739,6 +740,7 @@ RenderFrameHostImpl* RenderFrameHostManager::GetFrameHostForNavigation(
}
}
+ cross_navigation_pending_ = navigation_rfh != render_frame_host_.get();
nasko 2015/01/21 00:41:32 Are we sure the returned RFH will actually start o
clamy 2015/01/21 13:22:11 No, this is also called by BeginNavigation, so at
return navigation_rfh;
}

Powered by Google App Engine
This is Rietveld 408576698