Index: Source/core/workers/WorkerThread.h |
diff --git a/Source/core/workers/WorkerThread.h b/Source/core/workers/WorkerThread.h |
index 2405c86493da3a2d74d818d58207bc8e2333576c..b1de7b892d1af0c9fc4f6713853d1c20f7c3ec35 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" |
@@ -72,8 +73,10 @@ public: |
virtual void didStartRunLoop(); |
virtual void didStopRunLoop(); |
+ virtual void initializeBackingThread(); |
+ virtual void shutdownBackingThread(); |
kinuko
2015/05/28 16:21:59
Are they called outside WorkerThread or subclass?
sadrul
2015/05/28 16:51:56
These are called only from inside WorkerThread, ex
|
- 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) |
@@ -122,7 +125,7 @@ protected: |
virtual void postInitialize() { } |
- virtual v8::Isolate* initializeIsolate(); |
+ virtual PassOwnPtr<WorkerV8Isolate> initializeIsolate(); |
virtual void willDestroyIsolate(); |
virtual void destroyIsolate(); |
virtual void terminateV8Execution(); |
@@ -155,13 +158,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; |
kinuko
2015/05/28 16:21:59
thread and isolate are used in a very similar way,
sadrul
2015/05/28 16:51:56
They don't actually have to be. It needs a little
sadrul
2015/05/28 18:00:47
I have gone ahead and made this change. PTAL.
kinuko
2015/05/29 17:45:18
Well, was just asking because I vaguely remember y
sadrul
2015/05/29 18:26:32
I was, yes! (I was going to put it in WebThreadSup
kinuko
2015/05/31 15:18:24
WebThreadSupportingGC is used not only for JS-cont
|
// Used to signal thread shutdown. |
OwnPtr<WebWaitableEvent> m_shutdownEvent; |