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

Unified Diff: content/browser/renderer_host/input/touch_event_queue.cc

Issue 2367253006: Check for touch event queue size before popping. (Closed)
Patch Set: Change not reached line Created 4 years, 3 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: content/browser/renderer_host/input/touch_event_queue.cc
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index 701f4fde7fe7e88a6bc5febfeb41b2ecdb277d5a..5aea89905319f5bd1c05089f219950df118a5dad 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -766,7 +766,10 @@ void TouchEventQueue::AckTouchEventToClient(
InputEventAckState ack_result,
const ui::LatencyInfo* optional_latency_info) {
DCHECK(!dispatching_touch_ack_);
- DCHECK(!touch_queue_.empty());
+ if (touch_queue_.empty()) {
+ NOTREACHED() << "Too many acks";
+ return;
+ }
std::unique_ptr<CoalescedWebTouchEvent> acked_event(touch_queue_.front());
DCHECK(acked_event);
« 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