|
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
Committed: https://crrev.com/d8ef45f5f3b2d1cdfe863d346acda5da03ba6716
Cr-Commit-Position: refs/heads/master@{#406017}
Total comments: 2
Total comments: 14
|
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
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/base/real_time_domain.cc
|
View
|
1
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/base/task_queue.h
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/scheduler/base/task_queue_impl.h
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/base/task_queue_impl.cc
|
View
|
1
|
5 chunks |
+8 lines, -11 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/base/task_queue_manager_unittest.cc
|
View
|
1
|
7 chunks |
+17 lines, -9 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/base/time_domain.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/base/time_domain_unittest.cc
|
View
|
1
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/base/virtual_time_domain.h
|
View
|
1
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/base/virtual_time_domain.cc
|
View
|
1
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/child/compositor_worker_scheduler.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
components/scheduler/child/idle_helper.cc
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/scheduler/child/scheduler_helper_unittest.cc
|
View
|
1
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/scheduler/renderer/throttled_time_domain.h
|
View
|
1
2
3
|
1 chunk |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/renderer/throttled_time_domain.cc
|
View
|
1
2
|
1 chunk |
+22 lines, -14 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/renderer/throttling_helper.cc
|
View
|
1
|
3 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
components/scheduler/renderer/throttling_helper_unittest.cc
|
View
|
1
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
Total messages: 31 (17 generated)
|