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

Unified Diff: ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc

Issue 884313002: Fix uninitialized timestamps being passed to the gesture lib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/ozone/evdev/libgestures_glue/gesture_timer_provider.cc
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc
index 795fe2b3d3b9ffe2c8ba2376730fb2ce00bddec8..2b08b9844192b202800467e7a8e7b4d478eb09d3 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc
@@ -29,7 +29,10 @@ struct GesturesTimer {
private:
void OnTimerExpired() {
struct timespec ts;
- DCHECK(!clock_gettime(CLOCK_MONOTONIC, &ts));
+ int fail = clock_gettime(CLOCK_MONOTONIC, &ts);
+ DCHECK(!fail);
+
+ // Run the callback and reschedule the next run if requested.
stime_t next_delay = callback_(StimeFromTimespec(&ts), callback_data_);
if (next_delay >= 0) {
timer_.Start(FROM_HERE,
« 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