summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 22:39:21 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 22:39:21 +0000
commite5430c9883c5196cf768b4c9998d1e5209ed7606 (patch)
tree03232feb9d0c2e35889803cdba6141b0287acb14 /chrome/browser/tab_contents
parentcef17aeea0413bfdcbd404b837aac6a054024d95 (diff)
downloadchromium_src-e5430c9883c5196cf768b4c9998d1e5209ed7606.zip
chromium_src-e5430c9883c5196cf768b4c9998d1e5209ed7606.tar.gz
chromium_src-e5430c9883c5196cf768b4c9998d1e5209ed7606.tar.bz2
We need to traverse the infobars with a reverse loop as
we remove them (as after removal the index is pointing too far by 1, so the next immediate infobar won't be removed). BUG=None TEST=Get to a page with 2 infobars (for ex: crash the browser and restart (so you get the browser crashed infobar and make it not your default browser so you get the default browser infobar), kill the page process with the task manager. The sad page should be shown and the infobars should disappear. Review URL: http://codereview.chromium.org/646045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index d6632bb..483d9b5 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -2128,7 +2128,7 @@ void TabContents::RenderViewGone(RenderViewHost* rvh) {
SetIsCrashed(true);
// Remove all infobars.
- for (int i = 0; i < infobar_delegate_count(); ++i)
+ for (int i = infobar_delegate_count() - 1; i >=0 ; --i)
RemoveInfoBar(GetInfoBarDelegateAt(i));
// Tell the view that we've crashed so it can prepare the sad tab page.