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

Unified Diff: Source/core/dom/ExecutionContext.cpp

Issue 766183004: Dispose of DOMTimer upon explicit ExecutionContext unregistration. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 | « no previous file | Source/core/frame/DOMTimer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ExecutionContext.cpp
diff --git a/Source/core/dom/ExecutionContext.cpp b/Source/core/dom/ExecutionContext.cpp
index 23f4accad5d1ef752360d1a3de5642ed6c069d92..887f2e70ee4a597c20c5fe8596055cf0084bb9fb 100644
--- a/Source/core/dom/ExecutionContext.cpp
+++ b/Source/core/dom/ExecutionContext.cpp
@@ -205,6 +205,10 @@ void ExecutionContext::removeTimeoutByID(int timeoutID)
{
if (timeoutID <= 0)
return;
+
+ if (DOMTimer* removedTimer = m_timeouts.get(timeoutID))
+ removedTimer->dispose();
+
m_timeouts.remove(timeoutID);
}
« no previous file with comments | « no previous file | Source/core/frame/DOMTimer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698