Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6749)

Unified Diff: chrome/browser/ui/cocoa/page_info_bubble_controller.mm

Issue 7717027: [Mac] Keep the page-info-bubble controller alive until done with layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698