| Index: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
|
| diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
|
| index 644de114529b0c5986534ad14b14642bc4dd48c1..78f1ed6beb27b0a324c26fab5deda377eb353b22 100644
|
| --- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
|
| +++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
|
| @@ -18,6 +18,12 @@ namespace blink {
|
|
|
| namespace {
|
|
|
| +// This is a singleton class holding the compositor worker thread in this
|
| +// renderrer process. BackingThreadHolst::m_thread will never be cleared,
|
| +// but Oilpan and V8 are detached from the thread when the last compositor
|
| +// worker thread is gone.
|
| +// See WorkerThread::terminateAndWaitForAllWorkers for the process shutdown
|
| +// case.
|
| class BackingThreadHolder {
|
| public:
|
| static BackingThreadHolder& instance()
|
| @@ -27,10 +33,10 @@ public:
|
| }
|
|
|
| WorkerBackingThread* thread() { return m_thread.get(); }
|
| - void clear() { m_thread = nullptr; }
|
| void resetForTest()
|
| {
|
| ASSERT(!m_thread || (m_thread->workerScriptCount() == 0));
|
| + m_thread = nullptr;
|
| m_thread = WorkerBackingThread::createForTest(Platform::current()->compositorThread());
|
| }
|
|
|
| @@ -71,11 +77,6 @@ WorkerGlobalScope*CompositorWorkerThread::createWorkerGlobalScope(PassOwnPtr<Wor
|
| return CompositorWorkerGlobalScope::create(this, std::move(startupData), m_timeOrigin);
|
| }
|
|
|
| -void CompositorWorkerThread::clearSharedBackingThread()
|
| -{
|
| - BackingThreadHolder::instance().clear();
|
| -}
|
| -
|
| void CompositorWorkerThread::resetSharedBackingThreadForTest()
|
| {
|
| BackingThreadHolder::instance().resetForTest();
|
|
|