OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/workers/WorkerInspectorProxy.h" | 5 #include "core/workers/WorkerInspectorProxy.h" |
6 | 6 |
7 #include "core/dom/ExecutionContextTask.h" | 7 #include "core/dom/ExecutionContextTask.h" |
8 #include "core/frame/FrameConsole.h" | 8 #include "core/frame/FrameConsole.h" |
9 #include "core/inspector/IdentifiersFactory.h" | 9 #include "core/inspector/IdentifiersFactory.h" |
10 #include "core/inspector/InspectorInstrumentation.h" | 10 #include "core/inspector/InspectorInstrumentation.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 return DontPauseWorkerGlobalScopeOnStart; | 56 return DontPauseWorkerGlobalScopeOnStart; |
57 } | 57 } |
58 | 58 |
59 void WorkerInspectorProxy::workerThreadCreated(Document* document, | 59 void WorkerInspectorProxy::workerThreadCreated(Document* document, |
60 WorkerThread* workerThread, | 60 WorkerThread* workerThread, |
61 const KURL& url) { | 61 const KURL& url) { |
62 m_workerThread = workerThread; | 62 m_workerThread = workerThread; |
63 m_document = document; | 63 m_document = document; |
64 m_url = url.getString(); | 64 m_url = url.getString(); |
65 inspectorProxies().add(this); | 65 inspectorProxies().add(this); |
66 // We expect everyone starting worker thread to synchronously ask for workerSt
artMode right before. | 66 // We expect everyone starting worker thread to synchronously ask for |
| 67 // workerStartMode right before. |
67 bool waitingForDebugger = | 68 bool waitingForDebugger = |
68 InspectorInstrumentation::shouldWaitForDebuggerOnWorkerStart(document); | 69 InspectorInstrumentation::shouldWaitForDebuggerOnWorkerStart(document); |
69 InspectorInstrumentation::didStartWorker(document, this, waitingForDebugger); | 70 InspectorInstrumentation::didStartWorker(document, this, waitingForDebugger); |
70 } | 71 } |
71 | 72 |
72 void WorkerInspectorProxy::workerThreadTerminated() { | 73 void WorkerInspectorProxy::workerThreadTerminated() { |
73 if (m_workerThread) { | 74 if (m_workerThread) { |
74 DCHECK(inspectorProxies().contains(this)); | 75 DCHECK(inspectorProxies().contains(this)); |
75 inspectorProxies().remove(this); | 76 inspectorProxies().remove(this); |
76 InspectorInstrumentation::workerTerminated(m_document, this); | 77 InspectorInstrumentation::workerTerminated(m_document, this); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 "TracingSessionIdForWorker", TRACE_EVENT_SCOPE_THREAD, | 152 "TracingSessionIdForWorker", TRACE_EVENT_SCOPE_THREAD, |
152 "data", InspectorTracingSessionIdForWorkerEvent::data( | 153 "data", InspectorTracingSessionIdForWorkerEvent::data( |
153 sessionId, inspectorId(), m_workerThread)); | 154 sessionId, inspectorId(), m_workerThread)); |
154 } | 155 } |
155 | 156 |
156 DEFINE_TRACE(WorkerInspectorProxy) { | 157 DEFINE_TRACE(WorkerInspectorProxy) { |
157 visitor->trace(m_document); | 158 visitor->trace(m_document); |
158 } | 159 } |
159 | 160 |
160 } // namespace blink | 161 } // namespace blink |
OLD | NEW |