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

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

Issue 19494002: Distinguish actions registered with setTimeout() and setInterval(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase again. 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
« no previous file with comments | « Source/core/page/DOMTimer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DOMWindowTimers.cpp
diff --git a/Source/core/page/DOMWindowTimers.cpp b/Source/core/page/DOMWindowTimers.cpp
index 499a7981588b53667b198322dfdde02062f07e74..66a9142705663fdfb3fb0583963499f1b21297b1 100644
--- a/Source/core/page/DOMWindowTimers.cpp
+++ b/Source/core/page/DOMWindowTimers.cpp
@@ -42,24 +42,24 @@ namespace DOMWindowTimers {
int setTimeout(EventTarget* eventTarget, PassOwnPtr<ScheduledAction> action, int timeout)
{
- return DOMTimer::install(eventTarget->scriptExecutionContext(), action, timeout, true);
+ return DOMTimer::install(eventTarget->scriptExecutionContext(), DOMTimer::TimeoutType, action, timeout);
}
int setInterval(EventTarget* eventTarget, PassOwnPtr<ScheduledAction> action, int timeout)
{
- return DOMTimer::install(eventTarget->scriptExecutionContext(), action, timeout, false);
+ return DOMTimer::install(eventTarget->scriptExecutionContext(), DOMTimer::IntervalType, action, timeout);
}
void clearTimeout(EventTarget* eventTarget, int timeoutID)
{
if (ScriptExecutionContext* context = eventTarget->scriptExecutionContext())
- DOMTimer::removeByID(context, timeoutID);
+ DOMTimer::removeByIDIfTypeMatches(context, DOMTimer::TimeoutType, timeoutID);
}
void clearInterval(EventTarget* eventTarget, int timeoutID)
{
if (ScriptExecutionContext* context = eventTarget->scriptExecutionContext())
- DOMTimer::removeByID(context, timeoutID);
+ DOMTimer::removeByIDIfTypeMatches(context, DOMTimer::IntervalType, timeoutID);
}
} // namespace DOMWindowTimers
« no previous file with comments | « Source/core/page/DOMTimer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698