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

Unified Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc

Issue 796253002: Fix use-after-free when browser is closed during a drop-drop on desktop Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 months 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
Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
index 5bad49a3bfda60fb4783aedf8e67fcec32dd3f88..29676c338bc07e08ea4e35456f4a50ad686da1fc 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
@@ -431,11 +431,12 @@ DesktopDragDropClientAuraX11::DesktopDragDropClientAuraX11(
}
DesktopDragDropClientAuraX11::~DesktopDragDropClientAuraX11() {
- g_live_client_map.Get().erase(xwindow_);
- // Make sure that all observers are unregistered from source and target
- // windows. This may be necessary when the parent native widget gets destroyed
- // while a drag operation is in progress.
+ // This is necessary when the parent native widget gets destroyed while a drag
+ // operation is in progress.
+ move_loop_->EndMoveLoop();
NotifyDragLeave();
+
+ g_live_client_map.Get().erase(xwindow_);
}
// static

Powered by Google App Engine
This is Rietveld 408576698