Index: chrome/browser/ui/cocoa/page_info_bubble_controller.mm |
diff --git a/chrome/browser/ui/cocoa/page_info_bubble_controller.mm b/chrome/browser/ui/cocoa/page_info_bubble_controller.mm |
index f9952d41bca4bea98bb482ff7902389f505abcc5..dd288ba8557296cee3c924f0f1300485ff0d11d0 100644 |
--- a/chrome/browser/ui/cocoa/page_info_bubble_controller.mm |
+++ b/chrome/browser/ui/cocoa/page_info_bubble_controller.mm |
@@ -131,6 +131,10 @@ class PageInfoModelBubbleBridge : public PageInfoModelObserver { |
private: |
void PerformLayout() { |
+ // If the window is animating closed when this is called, the |
+ // animation could be holding the last reference to |controller_| |
+ // (and thus |this|). Pin it until the task is completed. |
+ scoped_nsobject<PageInfoBubbleController> keep_alive([controller_ retain]); |
[controller_ performLayout]; |
} |