Refresh driver should go back immediately when restored from test control

RESOLVED FIXED in mozilla37

Status

()

defect
RESOLVED FIXED
5 years ago
11 months ago

People

(Reporter: birtles, Assigned: birtles)

Tracking

(Depends on 1 bug, {regression})

Trunk
mozilla37
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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: nobody → bbirtles
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/3b5b53b73e15
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
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.