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

Unified Diff: chrome/browser/ui/cocoa/download/download_shelf_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/download/download_shelf_controller.mm
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
index ebebb03f18c96560117ed7c28b07ca535c560912..5026bcb6452e38cf19a6035512dad6ef18b2dd5e 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
@@ -141,14 +141,11 @@ const NSSize kHoverCloseButtonDefaultSize = { 18, 18 };
[self installTrackingArea];
}
-- (void)dealloc {
+- (void)browserWillBeDestroyed {
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [self cancelAutoClose];
- [self removeTrackingArea];
-
- // The controllers will unregister themselves as observers when they are
- // deallocated. No need to do that here.
- [super dealloc];
+ [self exiting];
tapted 2015/07/07 04:25:59 I think you can just move the contents of `exiting
jackhou1 2015/07/07 08:33:05 Done.
+ bridge_.reset();
+ navigator_ = nullptr;
}
// Called after the frame's rect has changed; usually when the height is

Powered by Google App Engine
This is Rietveld 408576698