| Index: Source/core/workers/WorkerThread.cpp
|
| diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
|
| index 5b978216f06d3d5b2227c45d3326ae261822d8db..e666afe977985d528be90c86b3d5d1fbbfb82e5b 100644
|
| --- a/Source/core/workers/WorkerThread.cpp
|
| +++ b/Source/core/workers/WorkerThread.cpp
|
| @@ -227,7 +227,7 @@ void WorkerThread::initialize(PassOwnPtr<WorkerThreadStartupData> startupData)
|
| }
|
| m_webScheduler = backingThread().platformThread().scheduler();
|
|
|
| - // The corresponding call to stopRunLoop() is in ~WorkerScriptController().
|
| + // The corresponding call to didStopRunLoop() is in ~WorkerScriptController().
|
| didStartRunLoop();
|
|
|
| // Notify proxy that a new WorkerGlobalScope has been created and started.
|
| @@ -285,17 +285,16 @@ void WorkerThread::shutdown()
|
| m_terminationEvent->signal();
|
| }
|
|
|
| -
|
| -void WorkerThread::stop()
|
| +void WorkerThread::terminate()
|
| {
|
| - // Prevent the deadlock between GC and an attempt to stop a thread.
|
| + // Prevent the deadlock between GC and an attempt to terminate a thread.
|
| SafePointScope safePointScope(ThreadState::HeapPointersOnStack);
|
| - stopInternal();
|
| + terminateInternal();
|
| }
|
|
|
| void WorkerThread::terminateAndWait()
|
| {
|
| - stop();
|
| + terminate();
|
| m_terminationEvent->wait();
|
| }
|
|
|
| @@ -305,12 +304,12 @@ bool WorkerThread::terminated()
|
| return m_terminated;
|
| }
|
|
|
| -void WorkerThread::stopInternal()
|
| +void WorkerThread::terminateInternal()
|
| {
|
| // Protect against this method, initialize() or termination via the global scope racing each other.
|
| MutexLocker lock(m_threadStateMutex);
|
|
|
| - // If stop has already been called, just return.
|
| + // If terminateInternal has already been called, just return.
|
| if (m_terminated)
|
| return;
|
| m_terminated = true;
|
| @@ -355,10 +354,10 @@ void WorkerThread::terminateAndWaitForAllWorkers()
|
| MutexLocker lock(threadSetMutex());
|
| HashSet<WorkerThread*> threads = workerThreads();
|
| for (WorkerThread* thread : threads)
|
| - thread->stopInternal();
|
| + thread->terminateInternal();
|
|
|
| for (WorkerThread* thread : threads)
|
| - thread->terminationEvent()->wait();
|
| + thread->m_terminationEvent->wait();
|
| }
|
|
|
| bool WorkerThread::isCurrentThread()
|
|
|