Refresh driver should go back immediately when restored from test control

RESOLVED FIXED in mozilla37

Status

()

RESOLVED FIXED
4 years ago
3 months ago

People

(Reporter: birtles, Assigned: birtles)

Tracking

(Depends on: 1 bug, {regression})

Trunk
mozilla37
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
In bug 1043078 I made the refresh driver no go backwards when switching timers. However, for the case when we restore the refresh driver from test control this makes the refresh driver maintain the test time for one tick even while it reports not being under test control.

In bug 927349 I was adding some assertions that depend on the refresh driver not going backwards *unless* it was being restored from test control but these were failing occasionally due to the test time being maintained.

We should either:

a) Pass a flag to EnsureTimerStarted indicating we are being restored from test control and not perform the clamping in that case, or
b) Simply check for a null mActiveTimer and not perform clamping then

I'm not sure that (b) is always valid--it seems like it we simply stop the timer (and set it to null) and then start it again we probably want to maintain the invariant that time is monotonically increasing. It seems (a) is probably better although more code.
(Assignee)

Comment 1

4 years ago
Created attachment 8538989 [details] [diff] [review]
Make refresh driver go back immediately when restored from test control
Attachment #8538989 - Flags: review?(vladimir)
(Assignee)

Updated

4 years ago
Assignee: nobody → bbirtles
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/3b5b53b73e15
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37

Updated

3 months ago
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.