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

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

Issue 267082: Makes it so when NSViewControllers go away that they remove their views from ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/cocoa/find_bar_cocoa_controller.mm
===================================================================
--- chrome/browser/cocoa/find_bar_cocoa_controller.mm (revision 28822)
+++ chrome/browser/cocoa/find_bar_cocoa_controller.mm (working copy)
@@ -50,6 +50,9 @@
// All animations should be explicitly stopped by the TabContents before a tab
// is closed.
DCHECK(!currentAnimation_.get());
+ // Remove our view from its superview so it doesn't attempt to reference
+ // it when the controller is gone.
+ [[self view] removeFromSuperview];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
« no previous file with comments | « chrome/browser/cocoa/extension_shelf_controller.mm ('k') | chrome/browser/cocoa/infobar_container_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698