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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 2730903005: Start with event_target in for loop to avoid GetEventTargeter crash. (Closed)
Patch Set: nits Created 3 years, 10 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 | « ui/aura/mus/window_tree_client_unittest.cc ('k') | no next file » | 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 02885e50c5cb50725468ce1e7e828f6835c51467..78ecee4d4604dcd3bc4fbde6f6c77c4b65b654e4 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -455,7 +455,7 @@ ui::EventTarget* WindowEventDispatcher::GetRootForEvent(ui::Event* event) {
}
ui::EventTarget* ancestor_with_targeter = event_target;
- for (ui::EventTarget* ancestor = event_target->GetParentTarget(); ancestor;
+ for (ui::EventTarget* ancestor = event_target; ancestor;
ancestor = ancestor->GetParentTarget()) {
if (ancestor->GetEventTargeter())
ancestor_with_targeter = ancestor;
« no previous file with comments | « ui/aura/mus/window_tree_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698