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

Unified Diff: chrome/browser/ui/views/tabs/base_tab_strip.cc

Issue 8915026: Attempt at fixing tab dragging crash. I believe the crash is happening (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/views/tabs/base_tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/base_tab_strip.cc b/chrome/browser/ui/views/tabs/base_tab_strip.cc
index e7e220d4f543bf4b4bbb8cafed805ac3c2b4d56b..c07c22d433359de11834b782ead81fe0ec4dbda6 100644
--- a/chrome/browser/ui/views/tabs/base_tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/base_tab_strip.cc
@@ -343,6 +343,10 @@ void BaseTabStrip::MaybeStartDrag(
TabStripSelectionModel selection_model;
if (!original_selection.IsSelected(model_index))
selection_model.Copy(original_selection);
+ // Delete the existing DragController before creating a new one. We do this as
+ // creating the DragController remembers the TabContents delegates and we need
+ // to make sure the existing DragController isn't still a delegate.
+ drag_controller_.reset();
drag_controller_.reset(TabDragController::Create(
this, tab, tabs, gfx::Point(x, y), tab->GetMirroredXInView(event.x()),
selection_model));
« 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