Index: Source/core/workers/WorkerThread.h |
diff --git a/Source/core/workers/WorkerThread.h b/Source/core/workers/WorkerThread.h |
index 2405c86493da3a2d74d818d58207bc8e2333576c..cad181ebbc1612972d2439181231532adf40087a 100644 |
--- a/Source/core/workers/WorkerThread.h |
+++ b/Source/core/workers/WorkerThread.h |
@@ -31,6 +31,7 @@ |
#include "core/dom/ExecutionContextTask.h" |
#include "core/frame/csp/ContentSecurityPolicy.h" |
#include "core/workers/WorkerGlobalScope.h" |
+#include "core/workers/WorkerIsolateWrapper.h" |
#include "core/workers/WorkerLoaderProxy.h" |
#include "platform/WebThreadSupportingGC.h" |
#include "platform/weborigin/SecurityOrigin.h" |
@@ -69,11 +70,10 @@ public: |
// some implementations can use an existing thread that is already being |
// used by other workers (e.g. compositor workers). |
virtual WebThreadSupportingGC& backingThread() = 0; |
- |
virtual void didStartRunLoop(); |
virtual void didStopRunLoop(); |
- v8::Isolate* isolate() const { return m_isolate; } |
+ v8::Isolate* isolate(); |
// 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,11 +122,12 @@ protected: |
virtual void postInitialize() { } |
- virtual v8::Isolate* initializeIsolate(); |
- virtual void willDestroyIsolate(); |
- virtual void destroyIsolate(); |
+ virtual PassOwnPtr<WorkerIsolateWrapper> createIsolateWrapper() = 0; |
kinuko
2015/06/01 13:15:41
Please comment that this needs to be called on the
sadrul
2015/06/01 14:21:16
Done.
|
virtual void terminateV8Execution(); |
+ virtual void initializeBackingThread(); |
+ virtual void shutdownBackingThread(); |
kinuko
2015/06/01 13:15:41
Please comment that these need to be called on the
sadrul
2015/06/01 14:21:16
Done.
|
+ |
// This is protected virtual for testing. |
virtual bool doIdleGc(double deadlineSeconds); |
@@ -155,13 +156,11 @@ 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_isolateWrapper|. |
Mutex m_threadStateMutex; |
RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope; |
- |
- v8::Isolate* m_isolate; |
- OwnPtr<V8IsolateInterruptor> m_interruptor; |
+ OwnPtr<WorkerIsolateWrapper> m_isolateWrapper; |
// Used to signal thread shutdown. |
OwnPtr<WebWaitableEvent> m_shutdownEvent; |