Index: chrome/browser/views/infobars/extension_infobar.cc |
diff --git a/chrome/browser/views/infobars/extension_infobar.cc b/chrome/browser/views/infobars/extension_infobar.cc |
index 6a6be3f2f58ecef0bba2bf8a3ba6f4482e0a43d1..f3e6dd3d3498ea7c3628184da7246e67188bc404 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(); |