summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/tab_strip.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/tabs/tab_strip.cc')
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc35
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));