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

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

Issue 1100413004: workers: Move ownership of WebThread from WorkerThread (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 8 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/WorkerThread.cpp
diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
index f59a49182a66ff3dcd4b57653f081d209767d181..f1a731bfaaf4ffbf91d433e59d03a1cf7ff65062 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -256,15 +256,15 @@ private:
WorkerThread* m_thread;
};
-WorkerThread::WorkerThread(const char* threadName, PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerThreadStartupData> startupData)
- : m_threadName(threadName)
- , m_terminated(false)
+WorkerThread::WorkerThread(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerThreadStartupData> startupData)
+ : m_terminated(false)
, m_workerLoaderProxy(workerLoaderProxy)
, m_workerReportingProxy(workerReportingProxy)
, m_startupData(startupData)
, m_isolate(nullptr)
, m_shutdownEvent(adoptPtr(blink::Platform::current()->createWaitableEvent()))
, m_terminationEvent(adoptPtr(blink::Platform::current()->createWaitableEvent()))
+ , m_thread(nullptr)
{
MutexLocker lock(threadSetMutex());
workerThreads().add(this);
@@ -282,7 +282,7 @@ void WorkerThread::start()
if (m_thread)
return;
- m_thread = createWebThreadSupportingGC();
+ m_thread = webThreadSupportingGC();
m_thread->postTask(FROM_HERE, new Task(threadSafeBind(&WorkerThread::initialize, AllowCrossThreadAccess(this))));
kinuko 2015/04/30 02:30:07 Can we have a separate flag (like m_started) and j
sadrul 2015/04/30 05:27:40 Done.
}
@@ -352,11 +352,6 @@ void WorkerThread::initialize()
postDelayedTask(FROM_HERE, createSameThreadTask(&WorkerThread::idleHandler, this), kShortIdleHandlerDelayMs);
}
-PassOwnPtr<WebThreadSupportingGC> WorkerThread::createWebThreadSupportingGC()
-{
- return WebThreadSupportingGC::create(m_threadName);
-}
-
void WorkerThread::cleanup()
{
// This should be called before we start the shutdown procedure.

Powered by Google App Engine
This is Rietveld 408576698