Index: third_party/WebKit/Source/core/frame/DOMTimerCoordinator.cpp |
diff --git a/third_party/WebKit/Source/core/frame/DOMTimerCoordinator.cpp b/third_party/WebKit/Source/core/frame/DOMTimerCoordinator.cpp |
index 064b701a006742560a71db1b5edd5c29212f9ec0..3f3460e64bae677e8ee565e425072b2cc7b4307a 100644 |
--- a/third_party/WebKit/Source/core/frame/DOMTimerCoordinator.cpp |
+++ b/third_party/WebKit/Source/core/frame/DOMTimerCoordinator.cpp |
@@ -31,15 +31,16 @@ int DOMTimerCoordinator::installNewTimeout(ExecutionContext* context, ScheduledA |
return timeoutID; |
} |
-void DOMTimerCoordinator::removeTimeoutByID(int timeoutID) |
+DOMTimer* DOMTimerCoordinator::removeTimeoutByID(int timeoutID) |
{ |
if (timeoutID <= 0) |
- return; |
+ return nullptr; |
- if (DOMTimer* removedTimer = m_timers.get(timeoutID)) |
+ DOMTimer* removedTimer = m_timers.take(timeoutID); |
+ if (removedTimer) |
removedTimer->disposeTimer(); |
- m_timers.remove(timeoutID); |
+ return removedTimer; |
} |
DEFINE_TRACE(DOMTimerCoordinator) |