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

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

Issue 633323003: Fix unresponsive tab closure when a navigation is in progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | content/browser/frame_host/render_frame_host_manager_unittest.cc » ('j') | 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 edd5723d8bb547db8e48c0e3ab20d4c5e3457dbd..e6e93d96f64bbbbcb7c1d75d017efb528f705af2 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -239,7 +239,13 @@ void RenderFrameHostManager::SetIsLoading(bool is_loading) {
}
bool RenderFrameHostManager::ShouldCloseTabOnUnresponsiveRenderer() {
- if (!cross_navigation_pending_)
+ // If we're waiting for a close ACK, then the tab should close whether there's
+ // a navigation in progress or not. Unfortunately, we also need to check for
+ // cases that we arrive here with no navigation in progress, since there are
+ // some tab closure paths that don't set is_waiting_for_close_ack to true.
+ // TODO(creis): Clean this up in http://crbug.com/418266.
+ if (!cross_navigation_pending_ ||
+ render_frame_host_->render_view_host()->is_waiting_for_close_ack())
return true;
// We should always have a pending RFH when there's a cross-process navigation
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698