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

Unified Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp

Issue 1955693003: compositor-worker: Keep worker backing thread alive for the lifetime of the compositor thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use the constructed WorkerBackingThread to post tasks. Created 4 years, 7 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: 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 3e5b4c487c5f42c74545c7794d2d1a859ee7e97c..f33c7fcbf6995e42f64ea97a5ddb8f915f674603 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.cpp
@@ -12,6 +12,7 @@
#include "core/workers/WorkerClients.h"
#include "modules/EventTargetModules.h"
#include "modules/compositorworker/CompositorWorkerMessagingProxy.h"
+#include "modules/compositorworker/CompositorWorkerThread.h"
namespace blink {
@@ -29,6 +30,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;

Powered by Google App Engine
This is Rietveld 408576698