summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_controller.mm
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 22:56:00 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 22:56:00 +0000
commit6a5cba47c0d6b1c7e157226c1095e0ee8bf3dc41 (patch)
treee870bb3ca4115a54d2b194230f4600ec853e289f /chrome/browser/cocoa/bookmark_bar_controller.mm
parent0acebfa1194d1b1b7155137ef6ccdf48b3b58258 (diff)
downloadchromium_src-6a5cba47c0d6b1c7e157226c1095e0ee8bf3dc41.zip
chromium_src-6a5cba47c0d6b1c7e157226c1095e0ee8bf3dc41.tar.gz
chromium_src-6a5cba47c0d6b1c7e157226c1095e0ee8bf3dc41.tar.bz2
Fix carwash in BookMarkBarController
objc objects that own c++ objects have funny behavior. The C++ object's destructor can be called at an unspecified future time, long past the time that the objc object is destructed. One possible symptom is an objc exception thrown when a browser window closes which could surface as a failure of Chrome to quit. Review URL: http://codereview.chromium.org/173232 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.mm1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm
index 75e3441..84cbbd3 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller.mm
@@ -73,6 +73,7 @@ const CGFloat kBookmarkHorizontalPadding = 1.0;
}
- (void)dealloc {
+ bridge_.reset(NULL);
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}