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

Unified Diff: content/browser/web_contents/render_view_host_manager.cc

Issue 25434002: Don't leave renderer process frozen when canceling JavaScript dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove WebContentsObserver Created 7 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
Index: content/browser/web_contents/render_view_host_manager.cc
diff --git a/content/browser/web_contents/render_view_host_manager.cc b/content/browser/web_contents/render_view_host_manager.cc
index db8d1d0553b3a0b232d98249ae189a0522c0d695..ee5973f440197edc253823fa50a312ff2c3ebb60 100644
--- a/content/browser/web_contents/render_view_host_manager.cc
+++ b/content/browser/web_contents/render_view_host_manager.cc
@@ -387,6 +387,9 @@ void RenderViewHostManager::SwapOutOldPage() {
return;
DCHECK(pending_render_view_host_);
+ // First close any modal dialogs that would prevent us from swapping out.
+ delegate_->CancelModalDialogsForRenderManager();
+
// Tell the old renderer it is being swapped out. This will fire the unload
// handler (without firing the beforeunload handler a second time). When the
// unload handler finishes and the navigation completes, we will send a
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698