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

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

Issue 2694743004: Reset the nesting level for setInterval after completion. (Closed)
Patch Set: remove use of gin Created 3 years, 10 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 | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/frame/DOMTimerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e38ac74e6489aa12c3e4eb579ca5f997bd5976ab..fbd084519f8036a2c1367078a115dadf1154d0d8 100644
--- a/third_party/WebKit/Source/core/frame/DOMTimer.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMTimer.cpp
@@ -157,8 +157,15 @@ void DOMTimer::fired() {
augmentRepeatInterval(minimumInterval - repeatInterval());
}
+ // Get ExecutionContext early as it might be cleared during
+ // action->execute().
+ ExecutionContext* executionContext = getExecutionContext();
jochen (gone - plz use gerrit) 2017/02/15 15:26:48 sorry for not catching this earlier, but |context|
Dan Elphick 2017/02/15 16:24:52 Done.
+
// No access to member variables after this point, it can delete the timer.
m_action->execute(context);
+
+ executionContext->timers()->setTimerNestingLevel(0);
+
return;
}
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/frame/DOMTimerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698