Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Fix uninitialized timestamps being passed to the gesture lib
Browse files Browse the repository at this point in the history
The CL corrects a bug where clock_gettime was placed in
a DCHECK call and thus not executed on release builds.

Contributed by [email protected]

BUG=chrome-os-partner:35111
TEST=samus ChromeOS build

Review URL: https://codereview.chromium.org/884313002

Cr-Commit-Position: refs/heads/master@{#313634}
  • Loading branch information
sheckylin authored and Commit bot committed Jan 29, 2015
1 parent 2f5993f commit c246784
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c246784

Please sign in to comment.