Index: Source/core/workers/WorkerGlobalScope.cpp |
diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp |
index 352993dbf9b8f21e0a00edb92c1cf34c2a136c3f..0f4a31b6fbf4bea1917fbd5db5ea86fbda8c232e 100644 |
--- a/Source/core/workers/WorkerGlobalScope.cpp |
+++ b/Source/core/workers/WorkerGlobalScope.cpp |
@@ -79,7 +79,7 @@ WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W |
, m_userAgent(userAgent) |
, m_script(adoptPtr(new WorkerScriptController(*this))) |
, m_thread(thread) |
- , m_workerInspectorController(adoptPtr(new WorkerInspectorController(this))) |
+ , m_workerInspectorController(adoptPtrWillBeNoop(new WorkerInspectorController(this))) |
, m_closing(false) |
, m_eventQueue(WorkerEventQueue::create(this)) |
, m_workerClients(workerClients) |
@@ -182,6 +182,9 @@ void WorkerGlobalScope::postTask(PassOwnPtr<ExecutionContextTask> task) |
void WorkerGlobalScope::clearInspector() |
{ |
+ if (!m_workerInspectorController) |
haraken
2014/06/12 08:40:25
Is it possible that clearInspector() is called twi
keishi
2014/06/13 03:37:34
Seems like its called twice.
First from
1 0x9e
haraken
2014/06/13 08:02:53
Thanks, understood. It seems strange that clearIns
keishi
2014/06/17 03:13:22
Yes I think we can remove the call to clearInspect
|
+ return; |
+ m_workerInspectorController->discard(); |
haraken
2014/06/12 08:40:25
We conventionally call this kind of method dispose
keishi
2014/06/13 03:37:34
Done.
|
m_workerInspectorController.clear(); |
} |
@@ -326,6 +329,7 @@ void WorkerGlobalScope::trace(Visitor* visitor) |
visitor->trace(m_console); |
visitor->trace(m_location); |
visitor->trace(m_navigator); |
+ visitor->trace(m_workerInspectorController); |
visitor->trace(m_eventQueue); |
visitor->trace(m_workerClients); |
WillBeHeapSupplementable<WorkerGlobalScope>::trace(visitor); |