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

Unified Diff: Source/core/page/DOMWindow.cpp

Issue 19494002: Distinguish actions registered with setTimeout() and setInterval(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test, and add a new test. Created 7 years, 5 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: Source/core/page/DOMWindow.cpp
diff --git a/Source/core/page/DOMWindow.cpp b/Source/core/page/DOMWindow.cpp
index 91af94846ad7a7891bc4672663ff139adfca6788..3a5121c1bdd8ac737a6460e5c0fe54d8c3be4991 100644
--- a/Source/core/page/DOMWindow.cpp
+++ b/Source/core/page/DOMWindow.cpp
@@ -1400,13 +1400,13 @@ void DOMWindow::resizeTo(float width, float height) const
void DOMWindow::clearTimeout(int timeoutID)
{
if (ScriptExecutionContext* context = scriptExecutionContext())
- DOMTimer::removeByID(context, timeoutID);
+ DOMTimer::removeByIDIfTypeMatches(context, DOMTimer::TimerTypeTimeout, timeoutID);
}
void DOMWindow::clearInterval(int timeoutID)
{
if (ScriptExecutionContext* context = scriptExecutionContext())
- DOMTimer::removeByID(context, timeoutID);
+ DOMTimer::removeByIDIfTypeMatches(context, DOMTimer::TimerTypeInterval, timeoutID);
}
static LayoutSize size(HTMLImageElement* image)

Powered by Google App Engine
This is Rietveld 408576698