diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 18:37:14 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 18:37:14 +0000 |
commit | a1660b5032541493766509f4e2835abc81541564 (patch) | |
tree | 57ba63a53bebc724d487abfcfdc6248665c1c8df /chrome/browser/views/tabs/tab_strip.cc | |
parent | 36f7e7bbb4ff17d46b2a2ed68c28301aad0eaebe (diff) | |
download | chromium_src-a1660b5032541493766509f4e2835abc81541564.zip chromium_src-a1660b5032541493766509f4e2835abc81541564.tar.gz chromium_src-a1660b5032541493766509f4e2835abc81541564.tar.bz2 |
Adds more debugging code in hopes of figuring out why on dragging the
tab strip model is empty, but not the tab strip. The latest crash data
indicates the tab strip is not closing all.
BUG=24132
TEST=none
Review URL: http://codereview.chromium.org/375017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31450 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs/tab_strip.cc')
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.cc | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index e70c88c..f643cbb 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -1206,34 +1206,17 @@ void TabStrip::MaybeStartDrag(Tab* tab, const views::MouseEvent& event) { if (!model_->ContainsIndex(index)) { // It appears to be possible for a drag to start with an invalid tab. // This records some extra information in hopes of tracking down why. - // The string contains the following, in order: - // . If a drag is already in progress, a 'D'. - // . If the model is closing all, an 'A'. - // . Index of tab the user is dragging. - // . Number of tabs. - // . Size of the model. - // . Indices of any tabs that are being closed. - // . ! end marker. std::string tmp; - if (drag_controller_.get()) - tmp += "D"; + StateTracker* tracker = model_->tracker(); + tracker->Append("|"); if (model_->closing_all()) - tmp += " A"; - tmp += " " + IntToString(index); - tmp += " " + IntToString(GetTabCount()); - tmp += " " + IntToString(model_->count()); - for (int i = 0; i < GetTabCount(); ++i) { - if (GetTabAt(i)->closing()) - tmp += " " + IntToString(i); - } - tmp += "!"; // End marker so we know we got all closing tabs. - - volatile char tab_state[128]; - for (size_t i = 0; i < std::min(ARRAYSIZE_UNSAFE(tab_state), - tmp.size()); ++i) { - tab_state[i] = tmp[i]; - } - CHECK(false); + tracker->Append("A"); + tracker->Append(" " + IntToString(index)); + tracker->Append(" " + IntToString(GetTabCount())); + tracker->Append(" " + IntToString(model_->count())); + if (model_->HasObserver(this)) + tracker->Append("Y"); + tracker->Crash(); return; } drag_controller_.reset(new DraggedTabController(tab, this)); |