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

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

Issue 8351038: [Mac] Stop listening for NSWindowWillCloseNotification in |-dealloc| to fix a crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | chrome/browser/ui/cocoa/hung_renderer_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
index 39aa4f012c311db88b616e8a84ff31cd77534705..5f306d2fb72bfa41bb960ceba21d92fe77e073be 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
@@ -132,6 +132,14 @@ const CGFloat kMenuYOffsetAdjust = 1.0;
return self;
}
+- (void)dealloc {
+ [[NSNotificationCenter defaultCenter]
+ removeObserver:self
+ name:NSWindowWillCloseNotification
+ object:[menuController_ window]];
+ [super dealloc];
+}
+
- (NSButton*)buttonView {
return static_cast<NSButton*>(self.view);
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/hung_renderer_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698