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

Unified Diff: Source/web/WebKit.cpp

Issue 656463004: Use the scheduling mechanism provided by the platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added shutdown call. Created 6 years, 2 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: Source/web/WebKit.cpp
diff --git a/Source/web/WebKit.cpp b/Source/web/WebKit.cpp
index eb629d06338d4382a58b4af0b20595cf6b897b5d..869d9090b4924bb13e17e97992e874abcc5b2af4 100644
--- a/Source/web/WebKit.cpp
+++ b/Source/web/WebKit.cpp
@@ -50,9 +50,9 @@
#include "platform/heap/Heap.h"
#include "platform/heap/glue/MessageLoopInterruptor.h"
#include "platform/heap/glue/PendingGCRunner.h"
-#include "platform/scheduler/Scheduler.h"
#include "public/platform/Platform.h"
#include "public/platform/WebPrerenderingSupport.h"
+#include "public/platform/WebScheduler.h"
#include "public/platform/WebThread.h"
#include "web/IndexedDBClientImpl.h"
#include "web/WebMediaPlayerClientImpl.h"
@@ -132,7 +132,7 @@ static void cryptographicallyRandomValues(unsigned char* buffer, size_t length)
static void callOnMainThreadFunction(WTF::MainThreadFunction function, void* context)
{
- Scheduler::shared()->postTask(FROM_HERE, bind(function, context));
+ Platform::current()->callOnMainThread(function, context);
}
void initializeWithoutV8(Platform* platform)
@@ -147,7 +147,6 @@ void initializeWithoutV8(Platform* platform)
WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction);
WTF::initializeMainThread(callOnMainThreadFunction);
Heap::init();
- Scheduler::initializeOnMainThread();
ThreadState::attachMainThread();
// currentThread will always be non-null in production, but can be null in Chromium unit tests.
@@ -220,7 +219,8 @@ void shutdownWithoutV8()
{
ASSERT(!s_endOfTaskRunner);
CoreInitializer::shutdown();
- Scheduler::shutdown();
+ if (WebScheduler* scheduler = Platform::current()->scheduler())
+ scheduler->shutdown();
Heap::shutdown();
WTF::shutdown();
Platform::shutdown();

Powered by Google App Engine
This is Rietveld 408576698