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 |