Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1017)

Issue 467153003: Changing setTimeout to not clamp delays to 1ms minimum, since a 1ms clamp is not in the spec. (Closed)

Created:
6 years, 4 months ago by alex clarke (OOO till 29th)
Modified:
6 years, 1 month ago
CC:
blink-reviews, eseidel
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Changing setTimeout to not clamp delays to 1ms minimum, since a 1ms clamp is not in the spec. ATTN Sheriffs: There is good probability that that this patch may have unintended side effects. For example there may be some JS tests that use setTimeout(...0) and hope that layout will occur. With this patch that's much less likely to be the case and is actually a bug in the test. I tried to fix some of those here https://codereview.chromium.org/644093003/ Another possibility is that something using setInterval(... 0) may suddenly show a perf regression due to running much more frequently. BUG=402694 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185372

Patch Set 1 #

Patch Set 2 : Lets fix this #

Patch Set 3 : It needs to be a double #

Patch Set 4 : Change affected layout tests to use setTimeout(..., 1); #

Patch Set 5 : Change some setTimeouts in inspector-test.js #

Patch Set 6 : Attempt to fix svg/animations/reinserting-svg-into-document.html flake #

Patch Set 7 : More changes to inspector-test.js #

Patch Set 8 : Use RAF where possible. #

Patch Set 9 : Not everything can use RAF. #

Patch Set 10 : Trying to fix a couple of flakes #

Patch Set 11 : A couple more RAFs #

Patch Set 12 : Rebased. #

Patch Set 13 : Fix a merge issue #

Patch Set 14 : Try to fix flake with a RAF #

Patch Set 15 : Removed some more set timeouts #

Patch Set 16 : Converted another setTimeout to a nested RAF #

Patch Set 17 : Attempt to fix windows inspector flakes #

Patch Set 18 : Perhaps the setInterval(..., 0) was the problem on windows. #

Patch Set 19 : Try and fix a mac flake in marquee-scrollamount.html #

Patch Set 20 : Remove change to InspectorTest.evaluateInPageWithTimeout. #

Patch Set 21 : Revert test changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M Source/core/frame/DOMTimer.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 31 (5 generated)
alexclarke
6 years, 4 months ago (2014-08-13 15:18:48 UTC) #1
Sami
+jamesr
6 years, 4 months ago (2014-08-13 15:20:38 UTC) #2
jamesr
lgtm
6 years, 4 months ago (2014-08-13 15:29:48 UTC) #3
alexclarke
The CQ bit was checked by alexclarke@google.com
6 years, 4 months ago (2014-08-14 10:15:05 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexclarke@chromium.org/467153003/40001
6 years, 4 months ago (2014-08-14 10:15:43 UTC) #5
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 4 months ago (2014-08-14 13:36:04 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-14 14:15:46 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/19831)
6 years, 4 months ago (2014-08-14 14:15:47 UTC) #8
alexclarke
It's common for layout tests to use setTimeout(..., 0) and expect some reapinting to happen. ...
6 years, 3 months ago (2014-08-26 14:35:34 UTC) #9
Sami
I wonder if some of these should be using requestAnimationFrame instead?
6 years, 3 months ago (2014-08-26 16:21:25 UTC) #10
alexclarke
On 2014/08/26 16:21:25, Sami wrote: > I wonder if some of these should be using ...
6 years, 3 months ago (2014-08-26 16:26:51 UTC) #11
alexclarke
I've changed a number of the tests to use RAF instead of setTimeout. PTAL
6 years, 2 months ago (2014-09-29 16:50:33 UTC) #12
jamesr
Land the test changes first and separately to make sure they're stable.
6 years, 2 months ago (2014-09-29 18:16:35 UTC) #13
alexclarke
On 2014/09/29 18:16:35, jamesr wrote: > Land the test changes first and separately to make ...
6 years, 2 months ago (2014-09-30 15:03:01 UTC) #14
eseidel
You might just try changing to 1ms everywhere and leave a FIXME.
6 years, 2 months ago (2014-10-14 16:20:22 UTC) #16
eseidel
I discussed this patch some with Hixie (html5 editor) and abarth and we agreed that ...
6 years, 2 months ago (2014-10-21 16:23:10 UTC) #17
alexclarke
On 2014/10/21 16:23:10, eseidel wrote: > I discussed this patch some with Hixie (html5 editor) ...
6 years, 2 months ago (2014-10-21 16:34:43 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/467153003/390001
6 years, 1 month ago (2014-11-10 13:19:51 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/19362)
6 years, 1 month ago (2014-11-10 13:23:02 UTC) #22
alex clarke (OOO till 29th)
+jochen@ Eric suggested I ask you to review this :)
6 years, 1 month ago (2014-11-13 11:10:34 UTC) #24
jochen (gone - plz use gerrit)
can you explain why this won't go back to the message loop in any case?
6 years, 1 month ago (2014-11-13 15:14:57 UTC) #25
alex clarke (OOO till 29th)
On 2014/11/13 15:14:57, jochen (slow) wrote: > can you explain why this won't go back ...
6 years, 1 month ago (2014-11-14 12:49:49 UTC) #26
jochen (gone - plz use gerrit)
lgtm
6 years, 1 month ago (2014-11-14 12:58:40 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/467153003/390001
6 years, 1 month ago (2014-11-14 13:08:55 UTC) #29
commit-bot: I haz the power
Committed patchset #21 (id:390001) as 185372
6 years, 1 month ago (2014-11-14 13:12:39 UTC) #30
alex clarke (OOO till 29th)
6 years, 1 month ago (2014-11-19 12:18:25 UTC) #31
Message was sent while issue was closed.
A revert of this CL (patchset #21 id:390001) has been created in
https://codereview.chromium.org/739813003/ by alexclarke@chromium.org.

The reason for reverting is: It broke setInterval(0) see
https://code.google.com/p/chromium/issues/detail?id=434601

We need to decide what to do with setInterval(0) I can see some legitimate uses
of that (e.g. implementing a scheduler in JS) but I can also see a lot of ways
existing code may break.

Perhaps we still need the clamp for setInterval :(.

Powered by Google App Engine
This is Rietveld 408576698