| Index: third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
|
| diff --git a/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp b/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
|
| index 7267083c7053962b89296c7c05e654b6b6691cce..040ce92ea79208362ca3f48cfceb67291d092614 100644
|
| --- a/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
|
| +++ b/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
|
| @@ -16,34 +16,6 @@
|
| #include "public/platform/WebTraceLocation.h"
|
|
|
| namespace blink {
|
| -
|
| -#define DEFINE_STATIC_LOCAL_WITH_LOCK(type, name, arguments) \
|
| - ASSERT(isolatesMutex().locked()); \
|
| - static type& name = *new type arguments
|
| -
|
| -static Mutex& isolatesMutex()
|
| -{
|
| - DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, new Mutex);
|
| - return mutex;
|
| -}
|
| -
|
| -static HashSet<v8::Isolate*>& isolates()
|
| -{
|
| - DEFINE_STATIC_LOCAL_WITH_LOCK(HashSet<v8::Isolate*>, isolates, ());
|
| - return isolates;
|
| -}
|
| -
|
| -static void addWorkerIsolate(v8::Isolate* isolate)
|
| -{
|
| - MutexLocker lock(isolatesMutex());
|
| - isolates().add(isolate);
|
| -}
|
| -
|
| -static void removeWorkerIsolate(v8::Isolate* isolate)
|
| -{
|
| - MutexLocker lock(isolatesMutex());
|
| - isolates().remove(isolate);
|
| -}
|
|
|
| WorkerBackingThread::WorkerBackingThread(const char* name, bool shouldCallGCOnShutdown)
|
| : m_backingThread(WebThreadSupportingGC::create(name))
|
| @@ -91,7 +63,6 @@
|
| {
|
| DCHECK(!m_isolate);
|
| m_isolate = V8PerIsolateData::initialize();
|
| - addWorkerIsolate(m_isolate);
|
| V8Initializer::initializeWorker(m_isolate);
|
| m_backingThread->initialize();
|
|
|
| @@ -118,17 +89,7 @@
|
| m_backingThread->shutdown();
|
|
|
| V8PerIsolateData::destroy(m_isolate);
|
| - removeWorkerIsolate(m_isolate);
|
| m_isolate = nullptr;
|
| }
|
|
|
| -// static
|
| -void WorkerBackingThread::MemoryPressureNotificationToWorkerThreadIsolates(
|
| - v8::MemoryPressureLevel level)
|
| -{
|
| - MutexLocker lock(isolatesMutex());
|
| - for (v8::Isolate* isolate : isolates())
|
| - isolate->MemoryPressureNotification(level);
|
| -}
|
| -
|
| } // namespace blink
|
|
|