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..2799a29b7df8de79d098f7b49f7e6cee8497106a 100644 |
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp |
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp |
@@ -10,6 +10,7 @@ |
#include "core/workers/WorkerClients.h" |
#include "modules/EventTargetModules.h" |
#include "modules/compositorworker/CompositorWorkerMessagingProxy.h" |
+#include "modules/compositorworker/CompositorWorkerThread.h" |
namespace blink { |
@@ -27,6 +28,12 @@ CompositorWorker* CompositorWorker::create(ExecutionContext* context, const Stri |
return nullptr; |
} |
CompositorWorker* worker = new CompositorWorker(context); |
+ |
+ // Ensure the compositor worker backing thread is ready before we try to |
+ // initialize the CompositorWorker so that we can construct oilpan |
+ // objects on the compositor thread referenced from the worker clients. |
+ CompositorWorkerThread::ensureSharedBackingThread(); |
+ |
if (worker->initialize(context, url, exceptionState)) |
return worker; |
return nullptr; |