diff options
Diffstat (limited to 'don-t-crash-on-reentrant-RunMoveLoop-call.patch')
-rw-r--r-- | don-t-crash-on-reentrant-RunMoveLoop-call.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/don-t-crash-on-reentrant-RunMoveLoop-call.patch b/don-t-crash-on-reentrant-RunMoveLoop-call.patch new file mode 100644 index 000000000000..d6a8f833e4d1 --- /dev/null +++ b/don-t-crash-on-reentrant-RunMoveLoop-call.patch @@ -0,0 +1,33 @@ +From 4b05247f43d592ce748933963df923d9a40705f8 Mon Sep 17 00:00:00 2001 +From: Sigurdur Asgeirsson <siggi@chromium.org> +Date: Mon, 8 Feb 2021 18:36:10 +0000 +Subject: [PATCH] Don't crash on reentrant RunMoveLoop call. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Bug: 1173484 +Change-Id: Ia75b200d2826586080c26089751bef1d12c8fbce +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2680089 +Reviewed-by: Scott Violet <sky@chromium.org> +Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org> +Cr-Commit-Position: refs/heads/master@{#851799} +--- + chrome/browser/ui/views/tabs/tab_drag_controller.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc +index 16c3c1e9df8c2..d2ccc2b965237 100644 +--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc ++++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc +@@ -1397,6 +1397,10 @@ void TabDragController::RunMoveLoop(const gfx::Vector2d& drag_offset) { + + move_loop_widget_ = GetAttachedBrowserWidget(); + DCHECK(move_loop_widget_); ++ ++ // RunMoveLoop can be called reentrantly from within another RunMoveLoop, ++ // in which case the observation is already established. ++ widget_observation_.Reset(); + widget_observation_.Observe(move_loop_widget_); + current_state_ = DragState::kDraggingWindow; + base::WeakPtr<TabDragController> ref(weak_factory_.GetWeakPtr()); |