[Webkit-unassigned] [Bug 253423] New: setInterval and setTimeout order isn't respected when timeout is 0
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Mar 5 18:27:43 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=253423
Bug ID: 253423
Summary: setInterval and setTimeout order isn't respected when
timeout is 0
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: tristan.fraipont at gmail.com
Created attachment 465310
--> https://bugs.webkit.org/attachment.cgi?id=465310&action=review
Test case
Online test case: https://jsfiddle.net/7g5f0cLz/
1. Queue a callback using setInterval(cb1, 0);
2. Queue a callback using setTimeout(cb2, 0);
The callback queued through setTimeout() is executed before the one queued through setInterval().
You can see this StackOverflow answer of mine https://stackoverflow.com/a/75646343/3702797 for a walk-through of the specs showing how this behavior is wrong. Basically, with the same ms value, the order should be respected.
Passing another ms value than 0 will make it behave normally.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230306/b372e2db/attachment.htm>
More information about the webkit-unassigned
mailing list