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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 651323002: Fixing a "use after free". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert prev patch submitted to the wrong CL by accident Created 6 years, 2 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
« no previous file with comments | « no previous file | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 0b1103d016880e8015092b7a734b0a5145a34acc..eadda03f6794645960382900eb4dcc4970ebb0a6 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -381,7 +381,8 @@ void WindowEventDispatcher::UpdateCapture(Window* old_capture,
if (details.dispatcher_destroyed)
return;
- old_capture->delegate()->OnCaptureLost();
+ if (!details.target_destroyed)
+ old_capture->delegate()->OnCaptureLost();
}
if (new_capture) {
« no previous file with comments | « no previous file | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698