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

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

Issue 215073002: WebContents could be blocked after pending cross-site navigation is canceled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index dc1393cb65da8e3bbe1ed4a689f196bc7e20f52c..a884b43f87ac15879c97fc8991d5b8a913928572 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -528,8 +528,15 @@ void RenderFrameHostImpl::OnBeforeUnloadACK(
// If this renderer navigated while the beforeunload request was in flight, we
// may have cleared this state in OnNavigate, in which case we can ignore
// this message.
+ // However renderer might also be swapped out but we still want to proceed
+ // with navigation, otherwise it would block whole web_contents. This can
+ // happen when pending cross-site navigation is canceled by second one just
+ // before OnNavigate, current (loaded) RVH is waiting for commit but second
+ // navigation is started from the beginning.
if (!render_view_host_->is_waiting_for_beforeunload_ack_ ||
- render_view_host_->rvh_state_ != RenderViewHostImpl::STATE_DEFAULT) {
+ (render_view_host_->rvh_state_ != RenderViewHostImpl::STATE_DEFAULT &&
+ render_view_host_->rvh_state_ !=
+ RenderViewHostImpl::STATE_WAITING_FOR_COMMIT)) {
Charlie Reis 2014/03/28 16:43:20 This doesn't seem right to me, since I don't yet s
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698