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

Unified Diff: Source/core/workers/WorkerMessagingProxy.cpp

Issue 1018863002: compositor-worker: Introduce CompositorWorker. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 9 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/core/workers/WorkerMessagingProxy.cpp
diff --git a/Source/core/workers/WorkerMessagingProxy.cpp b/Source/core/workers/WorkerMessagingProxy.cpp
index a1e4abde82d0b099d1efbdcad6a0aac35dcb0884..071d3a20ba8940b8593ee0bf2b2c051129d4cc48 100644
--- a/Source/core/workers/WorkerMessagingProxy.cpp
+++ b/Source/core/workers/WorkerMessagingProxy.cpp
@@ -125,7 +125,7 @@ void WorkerMessagingProxy::startWorkerGlobalScope(const KURL& scriptURL, const S
double originTime = document->loader() ? document->loader()->timing().referenceMonotonicTime() : monotonicallyIncreasingTime();
m_loaderProxy = WorkerLoaderProxy::create(this);
- RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(m_loaderProxy, *m_workerObjectProxy.get(), originTime, startupData.release());
+ RefPtr<WorkerThread> thread = createWorkerThread(originTime, startupData.release());
thread->start();
workerThreadCreated(thread);
m_workerInspectorProxy->workerThreadCreated(m_executionContext.get(), m_workerThread.get(), scriptURL);
@@ -199,7 +199,7 @@ void WorkerMessagingProxy::reportConsoleMessage(MessageSource source, MessageLev
frame->console().addMessage(consoleMessage.release());
}
-void WorkerMessagingProxy::workerThreadCreated(PassRefPtr<DedicatedWorkerThread> workerThread)
+void WorkerMessagingProxy::workerThreadCreated(PassRefPtr<WorkerThread> workerThread)
{
ASSERT(!m_askedToTerminate);
m_workerThread = workerThread;
@@ -213,6 +213,11 @@ void WorkerMessagingProxy::workerThreadCreated(PassRefPtr<DedicatedWorkerThread>
m_queuedEarlyTasks.clear();
}
+PassRefPtr<WorkerThread> WorkerMessagingProxy::createWorkerThread(double originTime, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData)
+{
+ return DedicatedWorkerThread::create(loaderProxy(), workerObjectProxy(), originTime, startupData);
+}
+
void WorkerMessagingProxy::workerObjectDestroyed()
{
m_workerObject = nullptr;

Powered by Google App Engine
This is Rietveld 408576698