From 82cd9c32cb9beb75a6562261307a957ee0096c04 Mon Sep 17 00:00:00 2001 From: "sky@google.com" Date: Thu, 20 Nov 2008 00:10:47 +0000 Subject: Don't execute a NOTREACHED in TabStrip::DestroyDraggedSourceTab if the tab strip contains the tab but the model is closing all. Normally the end of the animation removes the tab, but if we're closing all tabs the animation isn't run. I was hitting this when I have more than one window open and drag a tab in a window with a single tab and release it. BUG=none TEST=none Review URL: http://codereview.chromium.org/11294 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5733 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/tabs/tab_strip.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'chrome/browser/views/tabs') diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index 47329c5..0f7a743 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -570,7 +570,8 @@ void TabStrip::DestroyDraggedSourceTab(Tab* tab) { std::vector::iterator it = tab_data_.begin(); for (; it != tab_data_.end(); ++it) { if (it->tab == tab) { - NOTREACHED() << "Leaving in an inconsistent state!"; + if (!model_->closing_all()) + NOTREACHED() << "Leaving in an inconsistent state!"; tab_data_.erase(it); break; } -- cgit v1.1