This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22631 - "If the currently running task is a task that was created by the setTimeout() method, and timeout is less than 4, then increase timeout to 4." no longer matches UAs
Summary: "If the currently running task is a task that was created by the setTimeout()...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-10 00:00 UTC by contributor
Modified: 2013-07-26 23:27 UTC (History)
2 users (show)

See Also:


Attachments

Description contributor 2013-07-10 00:00:44 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#timers
Complete: http://www.whatwg.org/c#timers
Referrer: 

Comment:
"If the currently running task is a task that was created by the setTimeout()
method, and timeout is less than 4, then increase timeout to 4." no longer
matches UAs

Posted from: 2620:0:1000:167c:e6ce:8fff:fe07:8094 by ian@hixie.ch
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.3 Safari/537.36
Comment 1 Ian 'Hixie' Hickson 2013-07-10 00:14:03 UTC
Firefox:
http://mxr.mozilla.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#10000

Blink: (WebKit apparently still the same)
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/page/DOMTimer.cpp&sq=package:chromium&type=cs&l=41


Note that the two algorithms are just the same now, and that the clamping only happens after a number of iterations through it. If it's an interval, timeout 0 is also disallowed, and the timeout is reset after the code is run.
Comment 2 contributor 2013-07-26 23:27:51 UTC
Checked in as WHATWG revision r8095.
Check-in comment: Refactor the timer code to match current practice in WebKit, Gecko, and Blink (the ones whose source I could examine)
http://html5.org/tools/web-apps-tracker?from=8094&to=8095