| Index: Source/core/workers/WorkerThread.cpp
|
| diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
|
| index 7d6efc7e0b26cba91178b60b26e619b6bdb76e67..746eeb5e92e06940fc26eb58bb3603bfcaf69b84 100644
|
| --- a/Source/core/workers/WorkerThread.cpp
|
| +++ b/Source/core/workers/WorkerThread.cpp
|
| @@ -137,10 +137,14 @@ void WorkerThread::workerThread()
|
|
|
| ThreadIdentifier threadID = m_threadID;
|
|
|
| - ASSERT(m_workerGlobalScope->hasOneRef());
|
| -
|
| // 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.
|
| + // If Oilpan is enabled, we detach of the context/global scope, with the final heap cleanup below sweeping it out.
|
| +#if ENABLE(OILPAN)
|
| + m_workerGlobalScope->dispose();
|
| +#else
|
| + ASSERT(m_workerGlobalScope->hasOneRef());
|
| +#endif
|
| m_workerGlobalScope = nullptr;
|
|
|
| // Cleanup thread heap which causes all objects to be finalized.
|
|
|