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

Unified Diff: chrome/browser/xp_frame.cc

Issue 440: Attempt at fixing crash. I believe this is happening during session... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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
« no previous file with comments | « chrome/browser/vista_frame.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/xp_frame.cc
===================================================================
--- chrome/browser/xp_frame.cc (revision 1736)
+++ chrome/browser/xp_frame.cc (working copy)
@@ -2462,6 +2462,18 @@
// the tabstrip from the model's observer list because the model was
// destroyed with browser_.
if (browser_) {
+ if (bookmark_bar_view_.get() && bookmark_bar_view_->GetParent()) {
+ // The bookmark bar should not be parented by the time we get here.
+ // If you hit this NOTREACHED file a bug with the trace.
+ NOTREACHED();
+ bookmark_bar_view_->GetParent()->RemoveChildView(bookmark_bar_view_.get());
+ }
+
+ // Explicitly delete the BookmarkBarView now. That way we don't have to
+ // worry about the BookmarkBarView potentially outliving the Browser &
+ // Profile.
+ bookmark_bar_view_.reset(NULL);
+
browser_->tabstrip_model()->RemoveObserver(tabstrip_);
delete browser_;
browser_ = NULL;
« no previous file with comments | « chrome/browser/vista_frame.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698