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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_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: Remove dealloc override. 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/tabs/tab_strip_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index d949d4146b32eec822c0e72fb7f90f8ee17ec261..9467f5a5635e05b669a3ade820d0958e1f86b8ff 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -572,6 +572,10 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) {
return self;
}
+- (void)browserWillBeDestroyed {
+ browser_ = nullptr;
+}
+
- (void)dealloc {
[tabStripView_ setController:nil];
tapted 2015/07/06 07:26:18 Doing this for all the controlled views in other c
jackhou1 2015/07/07 03:27:27 I've just done this for things that might retain t

Powered by Google App Engine
This is Rietveld 408576698