Commit 0c86b6be authored by Ria Jiang's avatar Ria Jiang Committed by Commit Bot

Check if touch target is stale before dispatching.

If a touch target is not in the |owner_map| anymore, it's already been deleted;
fallback to INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS and DumpWithoutCrashing to
help debugging why |host| can be null in ProcessTouchEvent.

Bug: 814674
Change-Id: Ibf3faf1344f43760c4a60155316c193a78a61018
Reviewed-on: https://chromium-review.googlesource.com/1160795
Commit-Queue: Ria Jiang <riajiang@chromium.org>
Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580546}
parent df2048be
......@@ -596,6 +596,14 @@ void RenderWidgetHostInputEventRouter::DispatchTouchEvent(
}
DCHECK_GE(active_touches_, 0);
// Debugging for crbug.com/814674.
if (touch_target_.target && !IsViewInMap(touch_target_.target)) {
NOTREACHED() << "Touch events should not be routed to a destroyed target "
"View.";
touch_target_.target = nullptr;
base::debug::DumpWithoutCrashing();
}
if (!touch_target_.target) {
TouchEventWithLatencyInfo touch_with_latency(touch_event, latency);
root_view->ProcessAckedTouchEvent(touch_with_latency,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment