summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 22:10:54 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 22:10:54 +0000
commitff9efc6f99824e68a67cd694d4623f058d07cb51 (patch)
tree97f75155f35fbaacef38bb703b0e92df7e712137 /chrome
parentf963b4228da9461e588192bca5f1e4bb86452b58 (diff)
downloadchromium_src-ff9efc6f99824e68a67cd694d4623f058d07cb51.zip
chromium_src-ff9efc6f99824e68a67cd694d4623f058d07cb51.tar.gz
chromium_src-ff9efc6f99824e68a67cd694d4623f058d07cb51.tar.bz2
Remove all infobars from a tab when its renderer crashes.
They are irrelevant in the sad tab. BUG=36035 TEST=Navigate to a foreign page so the translate infobar shows up. From the task manager, kill the renderer process for that page. The translate infobar should disappear. Review URL: http://codereview.chromium.org/646023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39381 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 359a6c9..d6632bb 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -2127,6 +2127,10 @@ void TabContents::RenderViewGone(RenderViewHost* rvh) {
NotifyDisconnected();
SetIsCrashed(true);
+ // Remove all infobars.
+ for (int i = 0; i < infobar_delegate_count(); ++i)
+ RemoveInfoBar(GetInfoBarDelegateAt(i));
+
// Tell the view that we've crashed so it can prepare the sad tab page.
// Only do this if we're not in browser shutdown, so that TabContents
// objects that are not in a browser (e.g., HTML dialogs) and thus are