Closed Bug 1312908 Opened 8 years ago Closed 8 years ago

GC timing should use monotonic timing

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1173354

People

(Reporter: billm, Unassigned)

Details

I think if we switched from PRMJ_Now to JS_GetCurrentEmbedderTime, we would avoid problems where the clock jumps around.
I just saw this bug - Steve, could clock changes be the cause of the intermittent assertion failures in bug 1306249?
Flags: needinfo?(sphink)
(In reply to Jon Coppeard (:jonco) from comment #1)
> I just saw this bug - Steve, could clock changes be the cause of the
> intermittent assertion failures in bug 1306249?

Ooh... I somewhat doubt it, but it does seem possible, and this bug seems absolutely like the right thing to do. I hadn't realized we had access to a monotonic timer. The usage of PRMJ_Now has always bothered me, especially when there are assertions related to it.

It's not clear to me that JS_GetCurrentEmbedderTime is any more guaranteed to be monotonic than PRMJ_Now is, though. I guess it happens to be monotonic for Gecko?
Flags: needinfo?(sphink)
It looks like JS_GetCurrentEmbedderTime is going away in bug 1322790, so I guess we should use mozilla::TimeStamp instead.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.