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

Unified Diff: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm

Issue 1221173003: [Mac] Inform reference counted objects that hold a weak Browser* when the Browser is being destroye… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 5 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
Index: chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
index 14b691b3e49bdb67be302238d566ccad4124586b..795415f90a5d7515e406fcfa995c3b378ffe679a 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
@@ -88,11 +88,16 @@ const float kRightEdgeOffset = 25;
}
- (void)dealloc {
+ [self browserWillBeDestroyed];
+ [super dealloc];
+}
+
+- (void)browserWillBeDestroyed {
// All animations should have been explicitly stopped before a tab is closed.
DCHECK(!showHideAnimation_.get());
DCHECK(!moveAnimation_.get());
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [super dealloc];
+ browser_ = nullptr;
}
- (void)setFindBarBridge:(FindBarBridge*)findBarBridge {
« no previous file with comments | « chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h ('k') | chrome/browser/ui/cocoa/has_weak_browser_pointer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698