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

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: Fix ToolbarActionsBar tests. 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..cd45aecd4e8d25990cc7ae6c44486268fcf2a8bf 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
@@ -87,12 +87,12 @@ const float kRightEdgeOffset = 25;
return self;
}
-- (void)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 {

Powered by Google App Engine
This is Rietveld 408576698