summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/infobars
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-28 20:34:47 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-28 20:34:47 +0000
commit4a04295440ba2cd51e844015aab950b2ecece36b (patch)
tree2d9e691bbd8f1506552d19fbb8d75702cab6b9a3 /chrome/browser/views/infobars
parent2ae8a924423bb36127f397bad1354eb64da9c747 (diff)
downloadchromium_src-4a04295440ba2cd51e844015aab950b2ecece36b.zip
chromium_src-4a04295440ba2cd51e844015aab950b2ecece36b.tar.gz
chromium_src-4a04295440ba2cd51e844015aab950b2ecece36b.tar.bz2
Fix animation bug in ExtensionInfoBar would can result in orphaned instances in the view hierarchy
BUG=47576 TEST=none Review URL: http://codereview.chromium.org/2844033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/infobars')
-rw-r--r--chrome/browser/views/infobars/extension_infobar.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/views/infobars/extension_infobar.cc b/chrome/browser/views/infobars/extension_infobar.cc
index 6a6be3f..f3e6dd3 100644
--- a/chrome/browser/views/infobars/extension_infobar.cc
+++ b/chrome/browser/views/infobars/extension_infobar.cc
@@ -67,6 +67,14 @@ ExtensionInfoBar::~ExtensionInfoBar() {
void ExtensionInfoBar::OnExtensionPreferredSizeChanged(ExtensionView* view) {
DCHECK(view == delegate_->extension_host()->view());
+
+ // When the infobar is closed, it animates to 0 vertical height. We'll
+ // continue to get size changed notifications from the ExtensionView, but we
+ // need to ignore them otherwise we'll try to re-animate open (and leak the
+ // infobar view).
+ if (delegate_->closing())
+ return;
+
delegate_->extension_host()->view()->SetVisible(true);
gfx::Size sz = view->GetPreferredSize();