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

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: Adding a unit test for WindowEventDispatcher 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..d671a04ae842fcfd1dda48349eccd68ef3ad19ff 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -378,7 +378,7 @@ void WindowEventDispatcher::UpdateCapture(Window* old_capture,
gfx::Point(), 0, 0);
DispatchDetails details = DispatchEvent(old_capture, &event);
- if (details.dispatcher_destroyed)
+ if (details.dispatcher_destroyed || details.target_destroyed)
sky 2014/10/21 02:45:32 If target_destroyed is true, isn't the only thing
mfomitchev 2014/10/21 20:02:03 Done.
return;
old_capture->delegate()->OnCaptureLost();
« 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