Index: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp |
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp |
index e1aff2aec72b87ffba4af9a81c36b36f0783a39a..b4596c1b9fffe2692d7cdd069c46210b7f82edae 100644 |
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp |
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp |
@@ -210,16 +210,7 @@ void WorkerGlobalScope::dispose() |
clearScript(); |
clearInspector(); |
m_eventQueue->close(); |
- |
- // We do not clear the thread field of the |
- // WorkerGlobalScope. Other objects keep the worker global scope |
- // alive because they need its thread field to check that work is |
- // being carried out on the right thread. We therefore cannot clear |
- // the thread field before all references to the worker global |
- // scope are gone. |
- // |
- // TODO(haraken): It's nasty to keep a raw pointer to WorkerThread |
- // after disposing WorkerGlobalScope. m_thread should be cleared here. |
+ m_thread = nullptr; |
} |
void WorkerGlobalScope::didEvaluateWorkerScript() |