| Index: Source/web/WebKit.cpp
|
| diff --git a/Source/web/WebKit.cpp b/Source/web/WebKit.cpp
|
| index 16809ed4767079b4b01f4db1237e17ba5d5b048c..59fabd934529c27945a79205cb4bad769ee321ec 100644
|
| --- a/Source/web/WebKit.cpp
|
| +++ b/Source/web/WebKit.cpp
|
| @@ -50,6 +50,7 @@
|
| #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/WebThread.h"
|
| @@ -146,7 +147,7 @@ static void cryptographicallyRandomValues(unsigned char* buffer, size_t length)
|
|
|
| static void callOnMainThreadFunction(WTF::MainThreadFunction function, void* context)
|
| {
|
| - Platform::current()->callOnMainThread(function, context);
|
| + WebCore::Scheduler::shared()->postTask(bind(function, context));
|
| }
|
|
|
| void initializeWithoutV8(Platform* platform)
|
| @@ -161,6 +162,7 @@ void initializeWithoutV8(Platform* platform)
|
| WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction);
|
| WTF::initializeMainThread(callOnMainThreadFunction);
|
| WebCore::Heap::init();
|
| + WebCore::Scheduler::initializeOnMainThread();
|
|
|
| WebCore::ThreadState::attachMainThread();
|
| // currentThread will always be non-null in production, but can be null in Chromium unit tests.
|
| @@ -203,6 +205,7 @@ void shutdown()
|
|
|
| ASSERT(s_isolateInterruptor);
|
| WebCore::ThreadState::current()->removeInterruptor(s_isolateInterruptor);
|
| + WebCore::Scheduler::shutdown();
|
|
|
| // currentThread will always be non-null in production, but can be null in Chromium unit tests.
|
| if (Platform::current()->currentThread()) {
|
|
|