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

Unified Diff: ui/events/gestures/gesture_recognizer_impl.cc

Issue 466323004: The GestureRecognizer should never map an ID to a NULL consumer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/gesture_recognizer_impl.cc
diff --git a/ui/events/gestures/gesture_recognizer_impl.cc b/ui/events/gestures/gesture_recognizer_impl.cc
index 099d29f0112973af828b491cf255fe71110afd45..bc559d5b0eb12c866a42f124ecf7fd19a5430945 100644
--- a/ui/events/gestures/gesture_recognizer_impl.cc
+++ b/ui/events/gestures/gesture_recognizer_impl.cc
@@ -87,10 +87,13 @@ GestureConsumer* GestureRecognizerImpl::GetTouchLockedTarget(
GestureConsumer* GestureRecognizerImpl::GetTargetForGestureEvent(
const GestureEvent& event) {
- GestureConsumer* target = NULL;
int touch_id = event.details().oldest_touch_id();
- target = touch_id_target_for_gestures_[touch_id];
- return target;
+ if (!touch_id_target_for_gestures_.count(touch_id)) {
+ NOTREACHED() << "Touch ID does not map to a valid GestureConsumer.";
tdanderson 2014/08/13 15:48:00 Running this through the trybots to see if anythin
+ return NULL;
+ }
+
+ return touch_id_target_for_gestures_.at(touch_id);
}
GestureConsumer* GestureRecognizerImpl::GetTargetForLocation(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698