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

Unified Diff: chrome/browser/ui/sad_tab_helper.cc

Issue 9733023: Fix crash in TabContentsViewViews::Focus. This was caused by r125126. The subtle bug is that the Sa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sad_tab_helper.cc
===================================================================
--- chrome/browser/ui/sad_tab_helper.cc (revision 127433)
+++ chrome/browser/ui/sad_tab_helper.cc (working copy)
@@ -57,6 +57,10 @@
sad_tab_controller_mac::RemoveSadTab(sad_tab_.get());
#elif defined(TOOLKIT_VIEWS)
sad_tab_->Close();
+ // See http://crbug.com/117668. When the Widget is being destructed, we
+ // want calls to sad_tab() to return NULL.
+ scoped_ptr<views::Widget> local_sad_tab;
+ local_sad_tab.swap(sad_tab_);
#elif defined(TOOLKIT_GTK)
GtkWidget* expanded_container =
ChromeWebContentsViewDelegateGtk::GetFor(web_contents())->
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698