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

Unified Diff: ui/message_center/cocoa/popup_controller.mm

Issue 857463003: mac: Fix a dangling delegate bug with MCPopupController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from avi, round two. Created 5 years, 11 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 | « ui/message_center/cocoa/popup_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/cocoa/popup_controller.mm
diff --git a/ui/message_center/cocoa/popup_controller.mm b/ui/message_center/cocoa/popup_controller.mm
index 889d8dea6c590c78395fa032143ef54b77359899..13e30e4a3a20c10851eb734d901f23d7bbeecaa5 100644
--- a/ui/message_center/cocoa/popup_controller.mm
+++ b/ui/message_center/cocoa/popup_controller.mm
@@ -136,7 +136,17 @@
return self;
}
+#ifndef NDEBUG
+- (void)dealloc {
+ DCHECK(hasBeenClosed_);
+ [super dealloc];
+}
+#endif
+
- (void)close {
+#ifndef NDEBUG
+ hasBeenClosed_ = YES;
+#endif
[self setBoundsAnimation:nil];
if (trackingArea_.get())
[[[self window] contentView] removeTrackingArea:trackingArea_.get()];
@@ -239,6 +249,9 @@
if (isClosing_)
return;
+#ifndef NDEBUG
+ hasBeenClosed_ = YES;
+#endif
isClosing_ = YES;
// If the notification was swiped closed, do not animate it as the
« no previous file with comments | « ui/message_center/cocoa/popup_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698