| Index: Source/core/workers/WorkerThread.h
|
| diff --git a/Source/core/workers/WorkerThread.h b/Source/core/workers/WorkerThread.h
|
| index 0753bc3b766c0ec862f00feaafe5d1c87020077d..c336ac9fe138f5fac3e7fe9b4a4284d9b9467dc7 100644
|
| --- a/Source/core/workers/WorkerThread.h
|
| +++ b/Source/core/workers/WorkerThread.h
|
| @@ -32,6 +32,7 @@
|
| #include "core/frame/csp/ContentSecurityPolicy.h"
|
| #include "core/workers/WorkerGlobalScope.h"
|
| #include "core/workers/WorkerLoaderProxy.h"
|
| +#include "core/workers/WorkerV8Isolate.h"
|
| #include "platform/WebThreadSupportingGC.h"
|
| #include "platform/weborigin/SecurityOrigin.h"
|
| #include "wtf/Forward.h"
|
| @@ -71,8 +72,10 @@ public:
|
|
|
| virtual void didStartRunLoop();
|
| virtual void didStopRunLoop();
|
| + virtual void initializeBackingThread();
|
| + virtual void shutdownBackingThread();
|
|
|
| - v8::Isolate* isolate() const { return m_isolate; }
|
| + v8::Isolate* isolate() const { return m_isolate ? m_isolate->isolate() : nullptr; }
|
|
|
| // Can be used to wait for this worker thread to shut down.
|
| // (This is signalled on the main thread, so it's assumed to be waited on the worker context thread)
|
| @@ -121,7 +124,7 @@ protected:
|
|
|
| virtual void postInitialize() { }
|
|
|
| - virtual v8::Isolate* initializeIsolate();
|
| + virtual PassOwnPtr<WorkerV8Isolate> initializeIsolate();
|
| virtual void willDestroyIsolate();
|
| virtual void destroyIsolate();
|
| virtual void terminateV8Execution();
|
| @@ -153,13 +156,12 @@ private:
|
| RefPtrWillBePersistent<WorkerInspectorController> m_workerInspectorController;
|
| Mutex m_workerInspectorControllerMutex;
|
|
|
| - // This lock protects |m_workerGlobalScope|, |m_terminated|, |m_isolate| and |m_microtaskRunner|.
|
| + // This lock protects |m_workerGlobalScope|, |m_terminated|, and |m_isolate|.
|
| Mutex m_threadStateMutex;
|
|
|
| RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope;
|
|
|
| - v8::Isolate* m_isolate;
|
| - OwnPtr<V8IsolateInterruptor> m_interruptor;
|
| + OwnPtr<WorkerV8Isolate> m_isolate;
|
|
|
| // Used to signal thread shutdown.
|
| OwnPtr<WebWaitableEvent> m_shutdownEvent;
|
|
|