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

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

Issue 60813002: Fixes another places that may trigger deletion during tab dragging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/tab_drag_controller.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index bb452ef74e862ee346469916b96e9bb59ec622df..15d382e1935f1342865a78d2e6545465770fd2e4 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -1543,6 +1543,9 @@ void TabDragController::RunMoveLoop(const gfx::Vector2d& drag_offset) {
// Move the tabs into position.
MoveAttached(point_in_screen);
attached_tabstrip_->GetWidget()->Activate();
+ // Activate may trigger a focus loss, destroying us.
+ if (!ref)
+ return;
tab_strip_to_attach_to_after_exit_ = NULL;
}
DCHECK(attached_tabstrip_);
« 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