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

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

Issue 2133623002: Introduce Document::unthrottledTaskRunner() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 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
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 179c42293ac068b106321168aaac0d7ce5566771..bd538ad457614428f968bc40cb17235a413ed817 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5895,6 +5895,17 @@ WebTaskRunner* Document::timerTaskRunner() const
return Platform::current()->currentThread()->scheduler()->timerTaskRunner();
}
+WebTaskRunner* Document::unthrottledTaskRunner() const
+{
+ if (frame())
+ return m_frame->frameScheduler()->unthrottledTaskRunner();
+ if (m_importsController)
+ return m_importsController->master()->unthrottledTaskRunner();
+ if (m_contextDocument)
+ return m_contextDocument->unthrottledTaskRunner();
+ return Platform::current()->currentThread()->getWebTaskRunner();
+}
+
void Document::enforceInsecureRequestPolicy(WebInsecureRequestPolicy policy)
{
// Combine the new policy with the existing policy, as a base policy may be

Powered by Google App Engine
This is Rietveld 408576698