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

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

Issue 1087203002: Patch 2/3 to get WebScheduler via WebThread (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Style nits Created 5 years, 8 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 | « Source/bindings/core/v8/V8Initializer.cpp ('k') | Source/core/dom/ScriptRunnerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptRunner.cpp
diff --git a/Source/core/dom/ScriptRunner.cpp b/Source/core/dom/ScriptRunner.cpp
index 0e0e3ab688dcf4e6a5982408bd5403b2482a0291..7987bf5098300901c9c579c33f4ad0dc081ca6e3 100644
--- a/Source/core/dom/ScriptRunner.cpp
+++ b/Source/core/dom/ScriptRunner.cpp
@@ -30,7 +30,9 @@
#include "core/dom/Element.h"
#include "core/dom/ScriptLoader.h"
#include "platform/heap/Handle.h"
-#include "platform/scheduler/Scheduler.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebScheduler.h"
+#include "public/platform/WebThread.h"
#include "wtf/Functional.h"
// This bit of magic is needed by oilpan to prevent the ScriptRunner from leaking.
@@ -210,7 +212,7 @@ void ScriptRunner::executeScripts()
bool ScriptRunner::yieldForHighPriorityWork()
{
- if (!Scheduler::shared()->shouldYieldForHighPriorityWork())
+ if (!Platform::current()->currentThread()->scheduler()->shouldYieldForHighPriorityWork())
return false;
postTaskIfOneIsNotAlreadyInFlight();
@@ -223,7 +225,7 @@ void ScriptRunner::postTaskIfOneIsNotAlreadyInFlight()
return;
// FIXME: Rename task() so that it's obvious it cancels any pending task.
- Scheduler::shared()->postLoadingTask(FROM_HERE, m_executeScriptsTaskFactory.task());
+ Platform::current()->currentThread()->scheduler()->postLoadingTask(FROM_HERE, m_executeScriptsTaskFactory.task());
}
DEFINE_TRACE(ScriptRunner)
« no previous file with comments | « Source/bindings/core/v8/V8Initializer.cpp ('k') | Source/core/dom/ScriptRunnerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698