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

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

Issue 1100413004: workers: Move ownership of WebThread from WorkerThread (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: reference 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
« no previous file with comments | « Source/core/workers/SharedWorkerThread.h ('k') | Source/core/workers/WorkerThread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/SharedWorkerThread.cpp
diff --git a/Source/core/workers/SharedWorkerThread.cpp b/Source/core/workers/SharedWorkerThread.cpp
index 91b24ea6f7b0de56c2cc974a871ad3f30322b9e6..6a0e9625586ac9e154566244d791e18d3814b721 100644
--- a/Source/core/workers/SharedWorkerThread.cpp
+++ b/Source/core/workers/SharedWorkerThread.cpp
@@ -43,7 +43,7 @@ PassRefPtr<SharedWorkerThread> SharedWorkerThread::create(const String& name, Pa
}
SharedWorkerThread::SharedWorkerThread(const String& name, PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerThreadStartupData> startupData)
- : WorkerThread("SharedWorker Thread", workerLoaderProxy, workerReportingProxy, startupData)
+ : WorkerThread(workerLoaderProxy, workerReportingProxy, startupData)
, m_name(name.isolatedCopy())
{
}
@@ -57,4 +57,11 @@ PassRefPtrWillBeRawPtr<WorkerGlobalScope> SharedWorkerThread::createWorkerGlobal
return SharedWorkerGlobalScope::create(m_name, this, startupData);
}
+WebThreadSupportingGC& SharedWorkerThread::backingThread()
+{
+ if (!m_thread)
+ m_thread = WebThreadSupportingGC::create("SharedWorker Thread");
+ return *m_thread.get();
+}
+
} // namespace blink
« no previous file with comments | « Source/core/workers/SharedWorkerThread.h ('k') | Source/core/workers/WorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698