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

Unified Diff: chrome/browser/views/tabs/tab_strip.cc

Issue 150064: Fix crash in delayed tab resizing. If the Resize Relayout code is called afte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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/views/tabs/tab_strip.cc
===================================================================
--- chrome/browser/views/tabs/tab_strip.cc (revision 19515)
+++ chrome/browser/views/tabs/tab_strip.cc (working copy)
@@ -1191,6 +1191,12 @@
}
void TabStrip::ResizeLayoutTabs() {
+ // We've been called back after the TabStrip has been emptied out (probably
+ // just prior to the window being destroyed). We need to do nothing here or
+ // else GetTabAt below will crash.
+ if (GetTabCount() == 0)
+ return;
+
resize_layout_factory_.RevokeAll();
// It is critically important that this is unhooked here, otherwise we will
« 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