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

Issue 2158993002: (Merge) Fix a bug that could occasionaly cause setInterval to stop (Closed)

Created:
4 years, 5 months ago by alex clarke (OOO till 29th)
Modified:
4 years, 5 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2785
Target Ref:
refs/pending/branch-heads/2785
Project:
chromium
Visibility:
Public.

Description

(Merge) Fix a bug that could occasionaly cause setInterval to stop There was a bad interaction between throttled task queues and logic in TimerBase::setNextFireTime that could cause setInterval to stop firing. If a timer was posted to a throttled task queue after running on a normal task queue, it was possible for NOW to be in the past. Logic existed in TimeDomain::ComputeDelayedRunTime to compensate for this. Usually that worked fine, however the anti-drift logic in TimerBase for repeating tasks could cause the scheduled run time (as visible to TimerBase) to fall on the exact same time as the previous run. This would cause TimerBase::setNextFireTime to nop out, which would cause the setInterval to stop firing. This patch prevents that by changing ThrottledTimeDomain to be based on RealTimeDomain. This means Now() is the real time rather than a periodically updated virtual time. I.e. it's monotonically increasing. At the same time I've remove the now useless TimeDomain::ComputeDelayedRunTime BUG=625041 Review-Url: https://codereview.chromium.org/2155143002 Cr-Commit-Position: refs/heads/master@{#406017} (cherry picked from commit d8ef45f5f3b2d1cdfe863d346acda5da03ba6716) Committed: https://chromium.googlesource.com/chromium/src/+/a6348ac8c0afbe3db0991574e905bdec1e265999

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -82 lines) Patch
M components/scheduler/base/real_time_domain.h View 1 chunk +1 line, -2 lines 0 comments Download
M components/scheduler/base/real_time_domain.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M components/scheduler/base/task_queue.h View 2 chunks +2 lines, -1 line 0 comments Download
M components/scheduler/base/task_queue_impl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M components/scheduler/base/task_queue_impl.cc View 5 chunks +8 lines, -11 lines 0 comments Download
M components/scheduler/base/task_queue_manager_unittest.cc View 7 chunks +17 lines, -9 lines 0 comments Download
M components/scheduler/base/time_domain.h View 1 chunk +0 lines, -7 lines 0 comments Download
M components/scheduler/base/time_domain_unittest.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M components/scheduler/base/virtual_time_domain.h View 1 chunk +0 lines, -2 lines 0 comments Download
M components/scheduler/base/virtual_time_domain.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M components/scheduler/child/compositor_worker_scheduler.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/scheduler/child/idle_helper.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/scheduler/child/scheduler_helper_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M components/scheduler/renderer/throttled_time_domain.h View 1 chunk +9 lines, -9 lines 0 comments Download
M components/scheduler/renderer/throttled_time_domain.cc View 1 chunk +22 lines, -14 lines 0 comments Download
M components/scheduler/renderer/throttling_helper.cc View 3 chunks +4 lines, -5 lines 0 comments Download
M components/scheduler/renderer/throttling_helper_unittest.cc View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
alex clarke (OOO till 29th)
4 years, 5 months ago (2016-07-18 21:19:29 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
a6348ac8c0afbe3db0991574e905bdec1e265999.

Powered by Google App Engine
This is Rietveld 408576698