Commit 1e4da521 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Fix drag and drop reentrant crash

DragDropController::Drop() can be reentrant since exo::DataDevice
creates a nested RunLoop (crbug.com/1141745), and referencing
|drag_data_| after it has been moved causes a crash.

This is fixed by checking |!!drag_data_| in IsDragDropInProgress().

Bug: 1141745
Change-Id: Ide2b376d2b6d8dff3ba820c308e1cc1faffbe7e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494189Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarFergus Dall <sidereal@google.com>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820402}
parent 2b462def
...@@ -269,7 +269,7 @@ void DragDropController::DragCancel() { ...@@ -269,7 +269,7 @@ void DragDropController::DragCancel() {
} }
bool DragDropController::IsDragDropInProgress() { bool DragDropController::IsDragDropInProgress() {
return !!drag_drop_tracker_.get(); return !!drag_drop_tracker_ && !!drag_data_;
} }
void DragDropController::AddObserver( void DragDropController::AddObserver(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment