Index: Source/core/workers/WorkerScript.h |
diff --git a/Source/core/workers/WorkerThread.h b/Source/core/workers/WorkerScript.h |
similarity index 89% |
rename from Source/core/workers/WorkerThread.h |
rename to Source/core/workers/WorkerScript.h |
index 38352bd1ad6fdb55dd0929b8f73310c828f44454..5cdd60a3302693ee67c506e48267bd8e5c26f7da 100644 |
--- a/Source/core/workers/WorkerThread.h |
+++ b/Source/core/workers/WorkerScript.h |
@@ -24,8 +24,8 @@ |
* |
*/ |
-#ifndef WorkerThread_h |
-#define WorkerThread_h |
+#ifndef WorkerScript_h |
+#define WorkerScript_h |
#include "core/CoreExport.h" |
#include "core/dom/ExecutionContextTask.h" |
@@ -48,19 +48,18 @@ class WorkerGlobalScope; |
class WorkerInspectorController; |
class WorkerReportingProxy; |
class WorkerSharedTimer; |
-class WorkerThreadShutdownFinishTask; |
-class WorkerThreadStartupData; |
-class WorkerThreadTask; |
+class WorkerScriptShutdownFinishTask; |
+class WorkerScriptTask; |
+class WorkerScriptStartupData; |
enum WorkerThreadStartMode { |
DontPauseWorkerGlobalScopeOnStart, |
PauseWorkerGlobalScopeOnStart |
}; |
-// TODO(sadrul): Rename to WorkerScript. |
-class CORE_EXPORT WorkerThread : public RefCounted<WorkerThread> { |
+class CORE_EXPORT WorkerScript : public RefCounted<WorkerScript> { |
public: |
- virtual ~WorkerThread(); |
+ virtual ~WorkerScript(); |
virtual void start(); |
virtual void stop(); |
@@ -108,7 +107,7 @@ public: |
bool terminated(); |
// Number of active worker threads. |
kinuko
2015/05/08 12:09:52
Please update this comment.
|
- static unsigned workerThreadCount(); |
+ static unsigned workerScriptCount(); |
PlatformThreadId platformThreadId(); |
kinuko
2015/05/08 12:09:52
This method looks a bit strange now. getCurrentThr
|
@@ -116,10 +115,10 @@ public: |
void setWorkerInspectorController(WorkerInspectorController*); |
protected: |
- WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&, PassOwnPtr<WorkerThreadStartupData>); |
+ WorkerScript(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&, PassOwnPtr<WorkerScriptStartupData>); |
// Factory method for creating a new worker context for the thread. |
- virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(PassOwnPtr<WorkerThreadStartupData>) = 0; |
+ virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(PassOwnPtr<WorkerScriptStartupData>) = 0; |
virtual void postInitialize() { } |
@@ -130,7 +129,7 @@ protected: |
private: |
friend class WorkerSharedTimer; |
- friend class WorkerThreadShutdownFinishTask; |
+ friend class WorkerScriptShutdownFinishTask; |
void stopInShutdownSequence(); |
void stopInternal(); |
@@ -143,7 +142,7 @@ private: |
bool m_started; |
bool m_terminated; |
- MessageQueue<WorkerThreadTask> m_debuggerMessageQueue; |
+ MessageQueue<WorkerScriptTask> m_debuggerMessageQueue; |
OwnPtr<WebThread::TaskObserver> m_microtaskRunner; |
RefPtr<WorkerLoaderProxy> m_workerLoaderProxy; |
@@ -154,7 +153,7 @@ private: |
Mutex m_threadCreationMutex; |
RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope; |
- OwnPtr<WorkerThreadStartupData> m_startupData; |
+ OwnPtr<WorkerScriptStartupData> m_startupData; |
v8::Isolate* m_isolate; |
OwnPtr<V8IsolateInterruptor> m_interruptor; |
@@ -168,4 +167,4 @@ private: |
} // namespace blink |
-#endif // WorkerThread_h |
+#endif // WorkerScript_h |