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

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

Issue 617273004: Remove stale RFHM check now that unload runs in the background. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_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 8d557ace789b3b3c784bab09ebaa946467840a5b..3e23951027e74c96b274187200818fec9c0c0158 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -280,17 +280,14 @@ bool RenderFrameHostManager::ShouldCloseTabOnUnresponsiveRenderer() {
// in progress. Sanity check this for http://crbug.com/276333.
CHECK(pending_render_frame_host_);
- // If the tab becomes unresponsive during {before}unload while doing a
+ // Unload handlers run in the background, so we should never get an
+ // unresponsiveness warning for them.
+ CHECK(!render_frame_host_->IsWaitingForUnloadACK());
+
+ // 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_->IsWaitingForUnloadACK()) {
- // The request has been started and paused while we're waiting for the
- // unload handler to finish. We'll pretend that it did. The pending
- // renderer will then be swapped in as part of the usual DidNavigate logic.
- // (If the unload handler later finishes, this call will be ignored because
- // the pending_nav_params_ state will already be cleaned up.)
- current_frame_host()->OnSwappedOut();
- } else if (render_frame_host_->is_waiting_for_beforeunload_ack()) {
+ if (render_frame_host_->is_waiting_for_beforeunload_ack()) {
// 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
« 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