You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browser bug (a bug with a feature that may impact site compatibility)
What information was incorrect, unhelpful, or incomplete?
Both Chromium and Webkit use a int (long) instead of unsigned long for the requestAnimationFrame() request ID.
This means it can be negative on overflow.
What browsers does this problem apply to, if applicable?
Not fully, using Edge, I estimate the following loop to take ~1.5 hours to finish running and trigger the issue on my PC.
I would run for(let i = 0;i<2147483647;i++) { cancelAnimationFrame(requestAnimationFrame(() => {})); } then console.log(requestAnimationFrame(() => {}));.
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
What type of issue is this?
Browser bug (a bug with a feature that may impact site compatibility)
What information was incorrect, unhelpful, or incomplete?
Both Chromium and Webkit use a
int
(long
) instead ofunsigned long
for therequestAnimationFrame()
request ID.This means it can be negative on overflow.
What browsers does this problem apply to, if applicable?
Chromium (Chrome, Edge 79+, Opera, Samsung Internet), Safari, Firefox
What did you expect to see?
As per spec, the request ID should be unsigned.
Did you test this? If so, how?
Not fully, using Edge, I estimate the following loop to take ~1.5 hours to finish running and trigger the issue on my PC.
I would run
for(let i = 0;i<2147483647;i++) { cancelAnimationFrame(requestAnimationFrame(() => {})); }
thenconsole.log(requestAnimationFrame(() => {}));
.Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
MDN source:
https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame
MDN PR mentionning the issue:
mdn/content#37856
Links to WebKit source:
Link to the same issue in Blink (since based on Webkit):
Note that firefox (merged in july 2024) only recently fixed the issue:
And it gives an error instead of overflowing https://phabricator.services.mozilla.com/rMOZILLACENTRAL149722297f033d5c3ad126d0c72edcb1cb96d72e
https://searchfox.org/mozilla-central/source/dom/base/RequestCallbackManager.h#43
Do you have anything more you want to share?
No response
MDN URL
No response
MDN metadata
No response
The text was updated successfully, but these errors were encountered: