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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp

Issue 2003993002: Disallow throttling while running requestAnimationFrame callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 7 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: third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
diff --git a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
index efd0ecea0262ab79cf42eb6d800781855dff5ee2..2982c671cf98213f0b8bb1e64c16475f204f8e6d 100644
--- a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
@@ -76,6 +76,17 @@ DocumentLifecycle::AllowThrottlingScope::~AllowThrottlingScope()
s_allowThrottlingCount--;
}
+DocumentLifecycle::DisallowThrottlingScope::DisallowThrottlingScope(DocumentLifecycle& lifecycle)
+{
+ m_savedCount = s_allowThrottlingCount;
+ s_allowThrottlingCount = 0;
+}
+
+DocumentLifecycle::DisallowThrottlingScope::~DisallowThrottlingScope()
+{
+ s_allowThrottlingCount = m_savedCount;
+}
+
DocumentLifecycle::DocumentLifecycle()
: m_state(Uninitialized)
, m_detachCount(0)
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentLifecycle.h ('k') | third_party/WebKit/Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698