| Index: content/browser/renderer_host/input/passthrough_touch_event_queue.cc
|
| diff --git a/content/browser/renderer_host/input/passthrough_touch_event_queue.cc b/content/browser/renderer_host/input/passthrough_touch_event_queue.cc
|
| index a13ccbf51dfc60c013d843d4c448ec8b0b734877..b9cc039df19a5282ef8f436436ea6276e7c92afd 100644
|
| --- a/content/browser/renderer_host/input/passthrough_touch_event_queue.cc
|
| +++ b/content/browser/renderer_host/input/passthrough_touch_event_queue.cc
|
| @@ -117,7 +117,8 @@ PassthroughTouchEventQueue::PassthroughTouchEventQueue(
|
| maybe_has_handler_for_current_sequence_(false),
|
| drop_remaining_touches_in_sequence_(false),
|
| touchmove_slop_suppressor_(new TouchMoveSlopSuppressor),
|
| - send_touch_events_async_(false) {
|
| + send_touch_events_async_(false),
|
| + processing_acks_(false) {
|
| if (config.touch_ack_timeout_supported) {
|
| timeout_handler_.reset(
|
| new TouchTimeoutHandler(this, config.desktop_touch_ack_timeout_delay,
|
| @@ -265,6 +266,11 @@ void PassthroughTouchEventQueue::FlushQueue() {
|
| }
|
|
|
| void PassthroughTouchEventQueue::AckCompletedEvents() {
|
| + // Don't allow re-entrancy into this method otherwise
|
| + // the ordering of acks won't be preserved.
|
| + if (processing_acks_)
|
| + return;
|
| + base::AutoReset<bool> process_acks(&processing_acks_, true);
|
| while (!outstanding_touches_.empty()) {
|
| auto iter = outstanding_touches_.begin();
|
| if (iter->ack_state() == INPUT_EVENT_ACK_STATE_UNKNOWN)
|
|
|