OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 if (!m_tracingSessionId.isEmpty()) | 117 if (!m_tracingSessionId.isEmpty()) |
118 proxy->writeTimelineStartedEvent(m_tracingSessionId); | 118 proxy->writeTimelineStartedEvent(m_tracingSessionId); |
119 } | 119 } |
120 | 120 |
121 void InspectorWorkerAgent::workerTerminated(WorkerInspectorProxy* proxy) { | 121 void InspectorWorkerAgent::workerTerminated(WorkerInspectorProxy* proxy) { |
122 DCHECK(frontend() && autoAttachEnabled()); | 122 DCHECK(frontend() && autoAttachEnabled()); |
123 if (m_connectedProxies.find(proxy->inspectorId()) == m_connectedProxies.end()) | 123 if (m_connectedProxies.find(proxy->inspectorId()) == m_connectedProxies.end()) |
124 return; | 124 return; |
125 frontend()->detachedFromTarget(proxy->inspectorId()); | 125 frontend()->detachedFromTarget(proxy->inspectorId()); |
126 proxy->disconnectFromInspector(this); | 126 proxy->disconnectFromInspector(this); |
127 m_connectedProxies.remove(proxy->inspectorId()); | 127 m_connectedProxies.erase(proxy->inspectorId()); |
128 } | 128 } |
129 | 129 |
130 void InspectorWorkerAgent::connectToAllProxies() { | 130 void InspectorWorkerAgent::connectToAllProxies() { |
131 for (WorkerInspectorProxy* proxy : WorkerInspectorProxy::allProxies()) { | 131 for (WorkerInspectorProxy* proxy : WorkerInspectorProxy::allProxies()) { |
132 if (proxy->getDocument()->frame() && | 132 if (proxy->getDocument()->frame() && |
133 m_inspectedFrames->contains(proxy->getDocument()->frame())) | 133 m_inspectedFrames->contains(proxy->getDocument()->frame())) |
134 connectToProxy(proxy, false); | 134 connectToProxy(proxy, false); |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 frontend()->receivedMessageFromTarget(proxy->inspectorId(), message); | 175 frontend()->receivedMessageFromTarget(proxy->inspectorId(), message); |
176 } | 176 } |
177 | 177 |
178 DEFINE_TRACE(InspectorWorkerAgent) { | 178 DEFINE_TRACE(InspectorWorkerAgent) { |
179 visitor->trace(m_connectedProxies); | 179 visitor->trace(m_connectedProxies); |
180 visitor->trace(m_inspectedFrames); | 180 visitor->trace(m_inspectedFrames); |
181 InspectorBaseAgent::trace(visitor); | 181 InspectorBaseAgent::trace(visitor); |
182 } | 182 } |
183 | 183 |
184 } // namespace blink | 184 } // namespace blink |
OLD | NEW |