| Index: third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
|
| diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
|
| index 3eefc6ac2809d657c9ed86b7a22aaaa1ff712249..710db69089ea04d67f1a1e458cf300c35e4f0afe 100644
|
| --- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
|
| +++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
|
| @@ -5,11 +5,14 @@
|
| #include "modules/compositorworker/CompositorWorker.h"
|
|
|
| #include "bindings/core/v8/ExceptionState.h"
|
| +#include "core/dom/CompositorProxyClient.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/ExceptionCode.h"
|
| +#include "core/page/ChromeClient.h"
|
| #include "core/workers/WorkerClients.h"
|
| #include "modules/EventTargetModules.h"
|
| #include "modules/compositorworker/CompositorWorkerMessagingProxy.h"
|
| +#include "modules/compositorworker/CompositorWorkerThread.h"
|
|
|
| namespace blink {
|
|
|
| @@ -20,6 +23,9 @@ inline CompositorWorker::CompositorWorker(ExecutionContext* context)
|
|
|
| CompositorWorker* CompositorWorker::create(ExecutionContext* context, const String& url, ExceptionState& exceptionState)
|
| {
|
| + // Ensure the compositor worker backing thread is ready.
|
| + CompositorWorkerThread::ensureSharedBackingThread();
|
| +
|
| ASSERT(isMainThread());
|
| Document* document = toDocument(context);
|
| if (!document->page()) {
|
| @@ -42,10 +48,12 @@ const AtomicString& CompositorWorker::interfaceName() const
|
| return EventTargetNames::CompositorWorker;
|
| }
|
|
|
| -InProcessWorkerGlobalScopeProxy* CompositorWorker::createInProcessWorkerGlobalScopeProxy(ExecutionContext* worker)
|
| +InProcessWorkerGlobalScopeProxy* CompositorWorker::createInProcessWorkerGlobalScopeProxy(ExecutionContext* context)
|
| {
|
| - ASSERT(getExecutionContext()->isDocument());
|
| - return new CompositorWorkerMessagingProxy(this);
|
| + Document* document = toDocument(context);
|
| + WorkerClients* workerClients = WorkerClients::create();
|
| + provideCompositorProxyClientTo(workerClients, document->frame()->chromeClient().createCompositorProxyClient());
|
| + return new CompositorWorkerMessagingProxy(this, workerClients);
|
| }
|
|
|
| } // namespace blink
|
|
|