Closed Bug 1646799 Opened 3 months ago Closed 2 months ago

setInterval(..., 0) is not clamped, unlike setTimeout(..., 0)

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox-esr68 --- wontfix
firefox-esr78 --- wontfix
firefox79 --- wontfix
firefox80 --- fixed

People

(Reporter: mstange, Assigned: smaug)

References

(Blocks 3 open bugs, Regression)

Details

(Keywords: parity-chrome, regression, Whiteboard: [qf:p2:responsiveness])

Attachments

(2 files)

Attached file testcase

In this testcase, Firefox reports one call every 0.009ms, and Chrome reports one call every ~4ms.

This is causing excess resource usage on misbehaving websites such as https://www.gamesradar.com/ .

Whiteboard: [qf]
See Also: → 1326614
Severity: -- → S3
Priority: -- → P3
Whiteboard: [qf] → [qf:p2:responsiveness]

I'm not sure where that See also fits in, the behavior is occuring only in the active tab?

(In reply to Danial Horton from comment #1)

I'm not sure where that See also fits in, the behavior is occuring only in the active tab?

The ticket linked under "See Also"? It's also about throttling of the same method, therefore it could be relevant.

Blocks: 1649892
Blocks: 1649890

Some of these sites along with the quantcast script that causes this, are also loading a widget that also causes it, from https://widgets.future-fie.co.uk/

Note that on https://www.gamesradar.com/ and others, the offending setInterval() calls look like:

setInterval("function() { [native code] }", NaN);
Summary: setInterval(..., 0) is not throttled, unlike setTimeout(..., 0) → setInterval(..., 0) is not clamped, unlike setTimeout(..., 0)
Assignee: nobody → bugs
Regressed by: 512645
Regressed by: 1378586
No longer regressed by: 512645

hmm, I lost the link to my tryserver push.
Doing it again: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8d2573cf95c064aefc6015a735fd41425266d93f
And apparently I had left a tiny bug in the test.

Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1df40ae8828d
setInterval(..., 0) is not clamped, unlike setTimeout(..., 0), r=peterv
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
QA Whiteboard: [qa-80b-p2]
You need to log in before you can comment on or make changes to this bug.