Closed
Bug 909133
Opened 11 years ago
Closed 10 years ago
JS Pause Graph script no longer working
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: mark, Unassigned)
Details
Attachments
(1 file)
3.38 KB,
text/html
|
Details |
I used to use the GC pause graph script attached to this bug to test GC, but it's no longer working - At first glance I can't figure out why this stopped working, and it may be a functional regression. Regression window: Last good nightly: 2013-04-25 First bad nightly: 2013-04-26 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=690b5e0f6562&tochange=a6104e0e5a2c
Updated•11 years ago
|
Attachment #795178 -
Attachment mime type: text/plain → text/html
Updated•10 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Comment 1•10 years ago
|
||
The problem is that the "handler" function is used as the requestAnimationFrame callback and does this: function handler(timestamp) ... var delay = timestamp - prev; But "prev" is initially set as: start = prev = Date.now(); which is broken, because the timestamp passed to the handler is number of ms since page load started while "prev" is initially set to number of ms since start of 1970. The pushlog includes bug 704063. Before that, the testcase was picking up the prefixed requestAnimationFrame, which passes timestamps compatible with Date.now(). The unprefixed version, which the testcase uses if available, uses timestamps compatible with performance.now(). If I replace all instances of Date.now() with performance.now() in the script, it works fine. The script just needs to be fixed to use Date.now() when using prefixed requestAnimationFrame, and performance.now() otherwise.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Component: JavaScript Engine → DOM
Resolution: --- → INVALID
Reporter | ||
Comment 2•10 years ago
|
||
Thanks for the explanation. This difference was not at all clear from the available dev docs.
Comment 3•10 years ago
|
||
Ah, good point. I updated the note on https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame to make this clearer.
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•