WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
4784
Wrong order in calls when using setInterval and setTimeout
https://bugs.webkit.org/show_bug.cgi?id=4784
Summary
Wrong order in calls when using setInterval and setTimeout
Thomas Fuchs
Reported
2005-08-31 15:37:48 PDT
If multiple simultaneous calls are made to setInterval/setTimeout Safari begins to execute JavaScript in a wrong order and starts to neclect earlier setInterval intervals. See the provided URL for a test case. Click on "DropOut" by the black boxes for the most noticeable problem that is causes by this bug. For a correctly working implementation, see the URL in Firefox 1.0.X or Firefox DP 2.
Attachments
Testcase
(1.99 KB, text/html)
2005-09-01 07:58 PDT
,
Thomas Fuchs
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Thomas Fuchs
Comment 1
2005-08-31 16:00:36 PDT
"DropOut" also works fine on the black boxes in Internet Explorer 6 on W2K.
Mark Rowe (bdash)
Comment 2
2005-08-31 23:18:23 PDT
I can see the problem that you describe, but without a significantly reduced test case it's not easy to say whether your diagnosis is accurate. Are you able to come up with a reduced test case that demonstrates the problem?
http://webkit.opendarwin.org/quality/reduction.html
has more info if you need it. I'm confirming this as our behaviour differs substantially from Firefox.
Thomas Fuchs
Comment 3
2005-09-01 07:58:16 PDT
Created
attachment 3709
[details]
Testcase This is a test case showing that Safari has wildly varying timing when setInterval is called multiple times. If I can I'll come up with an even tighter test case. Example: IntervalTimer #0: 6 iterations, avg. delta: 38.666666666666664, min: 5, max: 58 IntervalTimer #1: 6 iterations, avg. delta: 152.83333333333334, min: 5, max: 735 IntervalTimer #2: 5 iterations, avg. delta: 184.8, min: 39, max: 741 (...) IntervalTimer #13: 4 iterations, avg. delta: 40.25, min: 40, max: 41 (...) IntervalTimer #98: 4 iterations, avg. delta: 212.25, min: 35, max: 723 IntervalTimer #99: 4 iterations, avg. delta: 213.75, min: 34, max: 730 On Firefox DP 2, results are consistent: IntervalTimer #0: 11 iterations, avg. delta: 89.18181818181819, min: 77, max: 143 IntervalTimer #1: 11 iterations, avg. delta: 89.0909090909091, min: 77, max: 143 IntervalTimer #2: 11 iterations, avg. delta: 89.0909090909091, min: 77, max: 143 IntervalTimer #3: 11 iterations, avg. delta: 89, min: 77, max: 143 IntervalTimer #4: 11 iterations, avg. delta: 89.0909090909091, min: 77, max: 143 IntervalTimer #5: 11 iterations, avg. delta: 89.0909090909091, min: 77, max: 144 (...) IntervalTimer #98: 11 iterations, avg. delta: 89.45454545454545, min: 77, max: 133 IntervalTimer #99: 11 iterations, avg. delta: 89.45454545454545, min: 77, max: 133
David Kilzer (:ddkilzer)
Comment 4
2006-02-06 05:40:12 PST
See also
Bug 7099
.
mitz
Comment 5
2006-12-19 09:43:17 PST
I think
r12774
(fix for
bug 7209
) fixed this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug