Commit d12c4127 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[MessageLoop] Don't clobber |recent_time_|

I'm about to duplicate that line in
https://chromium-review.googlesource.com/c/chromium/src/+/1106434
and it feels silly to clobber |recent_time_| since TimeTicks is
monotically increasing regardless of nested loops (cloberring it is at
best irrelevant and at worse forces an unecessary recomputation of
Now()).

R=danakj@chromium.org, kylechar@chromium.org

Bug: None
Change-Id: Ia11ca15fcde850fba5cc33bc1cbac68386495719
Reviewed-on: https://chromium-review.googlesource.com/1125168Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572592}
parent 54b9310a
......@@ -428,7 +428,7 @@ bool MessageLoop::DoWork() {
bool MessageLoop::DoDelayedWork(TimeTicks* next_delayed_work_time) {
if (!task_execution_allowed_ ||
!incoming_task_queue_->delayed_tasks().HasTasks()) {
recent_time_ = *next_delayed_work_time = TimeTicks();
*next_delayed_work_time = TimeTicks();
// It's possible to be woken up by a system event and have it cancel the
// upcoming delayed task from under us before DoDelayedWork() -- see comment
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment