Chromium Code Reviews| Index: Source/core/workers/WorkerThread.h |
| diff --git a/Source/core/workers/WorkerThread.h b/Source/core/workers/WorkerThread.h |
| index d9bd49b952000d06cc50138b92223b7815c46e40..41f10d99fbf559c244e9e33ee1039fca6e795f8d 100644 |
| --- a/Source/core/workers/WorkerThread.h |
| +++ b/Source/core/workers/WorkerThread.h |
| @@ -64,7 +64,7 @@ public: |
| virtual void start(); |
| virtual void stop(); |
| - virtual PassOwnPtr<WebThreadSupportingGC> createWebThreadSupportingGC(); |
| + virtual WebThreadSupportingGC* webThreadSupportingGC() = 0; |
|
kinuko
2015/04/30 02:30:07
Can you give a brief explanation? It'd be nice to
sadrul
2015/04/30 05:27:40
Done.
|
| virtual void didStartRunLoop(); |
| virtual void didStopRunLoop(); |
| @@ -110,7 +110,7 @@ public: |
| void setWorkerInspectorController(WorkerInspectorController*); |
| protected: |
| - WorkerThread(const char* threadName, PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&, PassOwnPtr<WorkerThreadStartupData>); |
| + WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&, PassOwnPtr<WorkerThreadStartupData>); |
| // Factory method for creating a new worker context for the thread. |
| virtual PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(PassOwnPtr<WorkerThreadStartupData>) = 0; |
| @@ -135,7 +135,6 @@ private: |
| void postDelayedTask(PassOwnPtr<ExecutionContextTask>, long long delayMs); |
| void postDelayedTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>, long long delayMs); |
| - const char* m_threadName; |
| bool m_terminated; |
| MessageQueue<WorkerThreadTask> m_debuggerMessageQueue; |
| OwnPtr<WebThread::TaskObserver> m_microtaskRunner; |
| @@ -159,12 +158,7 @@ private: |
| // Used to signal thread termination. |
| OwnPtr<WebWaitableEvent> m_terminationEvent; |
| - // FIXME: This has to be last because of crbug.com/401397 - the |
| - // WorkerThread might get deleted before it had a chance to properly |
| - // shut down. By deleting the WebThread first, we can guarantee that |
| - // no pending tasks on the thread might want to access any of the other |
| - // members during the WorkerThread's destruction. |
| - OwnPtr<WebThreadSupportingGC> m_thread; |
| + WebThreadSupportingGC* m_thread; |
| }; |
| } // namespace blink |