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

Review URL: https://codereview.chromium.org/467153003

git-svn-id: svn://svn.chromium.org/blink/trunk@185372 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 4084780a
......@@ -99,7 +99,7 @@ DOMTimer::DOMTimer(ExecutionContext* context, PassOwnPtr<ScheduledAction> action
if (shouldForwardUserGesture(interval, m_nestingLevel))
m_userGestureToken = UserGestureIndicator::currentToken();
double intervalMilliseconds = std::max(oneMillisecond, interval * oneMillisecond);
double intervalMilliseconds = std::max(0.0, interval * oneMillisecond);
if (intervalMilliseconds < minimumInterval && m_nestingLevel >= maxTimerNestingLevel)
intervalMilliseconds = minimumInterval;
if (singleShot)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment