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

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

Issue 2853493002: Restore one millisecond minimum timeout for setTimeout. (Closed)
Patch Set: Created 3 years, 8 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 ce62e1b5d324a4d14fabc8fa39a4265dbf133a0c..e527576461c0599bedf7597e79de672dd7f5ce41 100644
--- a/third_party/WebKit/Source/core/frame/DOMTimer.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMTimer.cpp
@@ -88,10 +88,8 @@ DOMTimer::DOMTimer(ExecutionContext* context,
user_gesture_token_ = UserGestureIndicator::CurrentToken();
}
- // TODO(delphick): Remove the single shot guard here so that this affects
- // setInterval as well.
double interval_milliseconds =
- std::max(single_shot ? 0.0 : kOneMillisecond, interval * kOneMillisecond);
+ std::max(kOneMillisecond, interval * kOneMillisecond);
if (interval_milliseconds < kMinimumInterval &&
nesting_level_ >= kMaxTimerNestingLevel)
interval_milliseconds = kMinimumInterval;

Powered by Google App Engine
This is Rietveld 408576698