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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 8586033: Fixes use after free in BrowserView, and cleans up a couple of style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/fullscreen_exit_bubble_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 8ed495b62b112f538e7ec4afd51b0e26ad6fc077..711715d5705a956aa711c98732be20974088ba6e 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -322,8 +322,7 @@ BrowserView::BrowserView(Browser* browser)
hung_window_detector_(&hung_plugin_action_),
ticker_(0),
#endif
- force_location_bar_focus_(false)
- {
+ force_location_bar_focus_(false) {
browser_->tabstrip_model()->AddObserver(this);
registrar_.Add(
@@ -333,6 +332,12 @@ BrowserView::BrowserView(Browser* browser)
}
BrowserView::~BrowserView() {
+#if defined(USE_AURA)
+ // Destroy LauncherIconUpdater early on as it listens to the TabstripModel,
+ // which is destroyed by the browser.
+ icon_updater_.reset();
+#endif
+
browser_->tabstrip_model()->RemoveObserver(this);
#if defined(OS_WIN) && !defined(USE_AURA)
« no previous file with comments | « no previous file | chrome/browser/ui/views/fullscreen_exit_bubble_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698