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

Unified Diff: chrome/browser/cocoa/bookmark_bubble_controller.mm

Issue 173428: Fix bookmark bubble crash.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/cocoa/bookmark_bubble_controller.mm
===================================================================
--- chrome/browser/cocoa/bookmark_bubble_controller.mm (revision 24030)
+++ chrome/browser/cocoa/bookmark_bubble_controller.mm (working copy)
@@ -113,6 +113,14 @@
// We are the delegate of our own window so we know when we lose key.
// When we lose key status we close, mirroring Windows behaivor.
- (void)windowDidResignKey:(NSNotification*)notification {
+
+ // If we get here, we are done with this window and controller. The
+ // call of close: may destroy us which destroys the window. But the
+ // window is in the middle of processing resignKeyWindow. We
+ // retain/autorelease the window to insure it lasts until the end of
+ // this event.
+ [[window_ retain] autorelease];
+
if ([window_ isVisible])
[self close:self];
}
« 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