Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 98938c00423b896cd4d37c1ae274639e9d6277de..3c0645b6808f569a4e7739225eccfb71b0811685 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2850,6 +2850,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(); |