summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/web_contents/web_contents_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index c5765d5..6b6cf00 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2895,6 +2895,10 @@ void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh,
return;
}
+ // Cancel any visible dialogs so they are not left dangling over the sad tab.
+ if (dialog_manager_)
+ dialog_manager_->CancelActiveAndPendingDialogs(this);
+
ClearPowerSaveBlockers(rvh);
SetIsLoading(rvh, false, NULL);
NotifyDisconnected();