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

Unified Diff: third_party/WebKit/Source/core/frame/DOMTimer.cpp

Issue 2738773004: No longer clamp setTimeout(..., 0) to 1ms. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/DOMTimer.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMTimer.cpp b/third_party/WebKit/Source/core/frame/DOMTimer.cpp
index 8a9ff9e0702187253872d79dfdd945c37b9820db..df9f2303d000d5a905829bf8c0c7dfa1ed8685c1 100644
--- a/third_party/WebKit/Source/core/frame/DOMTimer.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMTimer.cpp
@@ -93,7 +93,7 @@ DOMTimer::DOMTimer(ExecutionContext* context,
}
double intervalMilliseconds =
- std::max(oneMillisecond, interval * oneMillisecond);
+ std::max(singleShot ? 0.0 : oneMillisecond, interval * oneMillisecond);
Sami 2017/03/08 14:15:55 Did we try to make the minimum always be 0 for all
if (intervalMilliseconds < minimumInterval &&
m_nestingLevel >= maxTimerNestingLevel)
intervalMilliseconds = minimumInterval;

Powered by Google App Engine
This is Rietveld 408576698