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}
(cherry picked from commit c246784)

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

Cr-Commit-Position: refs/branch-heads/2272@{#183}
Cr-Branched-From: 827a380-refs/heads/master@{#310958}
  • Loading branch information
mspang committed Feb 2, 2015
1 parent e22ae2e commit 86342d7
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 86342d7

Please sign in to comment.