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

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

Issue 177073004: Oilpan: move core/workers to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 87f1e87f2c08365c7e09a7fb9257762c674bf665..58933c8ea10dd161fc4447fa0a820cbbeceb9ac9 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -49,6 +49,8 @@
namespace WebCore {
+DEFINE_GC_INFO(WorkerThread);
+
static Mutex& threadSetMutex()
{
AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex);
@@ -67,7 +69,7 @@ unsigned WorkerThread::workerThreadCount()
return workerThreads().size();
}
-WorkerThread::WorkerThread(WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerThreadStartupData> startupData)
+WorkerThread::WorkerThread(WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData)
: m_threadID(0)
, m_workerLoaderProxy(workerLoaderProxy)
, m_workerReportingProxy(workerReportingProxy)
@@ -136,7 +138,9 @@ void WorkerThread::workerThread()
ThreadIdentifier threadID = m_threadID;
+#if !ENABLE(OILPAN)
ASSERT(m_workerGlobalScope->hasOneRef());
+#endif
// The below assignment will destroy the context, which will in turn notify messaging proxy.
// We cannot let any objects survive past thread exit, because no other thread will run GC or otherwise destroy them.
@@ -253,4 +257,10 @@ void WorkerThread::releaseFastMallocFreeMemoryInAllThreads()
(*it)->runLoop().postTask(adoptPtr(new ReleaseFastMallocFreeMemoryTask));
}
+void WorkerThread::trace(Visitor* visitor)
+{
+ visitor->trace(m_workerGlobalScope);
+ visitor->trace(m_startupData);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698