OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/v8_inspector/V8InspectorSessionImpl.h" | 5 #include "platform/v8_inspector/V8InspectorSessionImpl.h" |
6 | 6 |
7 #include "platform/v8_inspector/InjectedScript.h" | 7 #include "platform/v8_inspector/InjectedScript.h" |
8 #include "platform/v8_inspector/InspectedContext.h" | 8 #include "platform/v8_inspector/InspectedContext.h" |
9 #include "platform/v8_inspector/RemoteObjectId.h" | 9 #include "platform/v8_inspector/RemoteObjectId.h" |
10 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" | 10 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 ASSERT(m_instrumentationCounter + delta >= 0); | 169 ASSERT(m_instrumentationCounter + delta >= 0); |
170 if (!m_instrumentationCounter && m_client) | 170 if (!m_instrumentationCounter && m_client) |
171 m_client->startInstrumenting(); | 171 m_client->startInstrumenting(); |
172 m_instrumentationCounter += delta; | 172 m_instrumentationCounter += delta; |
173 if (!m_instrumentationCounter && m_client) | 173 if (!m_instrumentationCounter && m_client) |
174 m_client->stopInstrumenting(); | 174 m_client->stopInstrumenting(); |
175 } | 175 } |
176 | 176 |
177 void V8InspectorSessionImpl::addInspectedObject(PassOwnPtr<V8RuntimeAgent::Inspe
ctable> inspectable) | 177 void V8InspectorSessionImpl::addInspectedObject(PassOwnPtr<V8RuntimeAgent::Inspe
ctable> inspectable) |
178 { | 178 { |
179 m_inspectedObjects.prepend(inspectable); | 179 m_inspectedObjects.prepend(std::move(inspectable)); |
180 while (m_inspectedObjects.size() > kInspectedObjectBufferSize) | 180 while (m_inspectedObjects.size() > kInspectedObjectBufferSize) |
181 m_inspectedObjects.removeLast(); | 181 m_inspectedObjects.removeLast(); |
182 } | 182 } |
183 | 183 |
184 V8RuntimeAgent::Inspectable* V8InspectorSessionImpl::inspectedObject(unsigned nu
m) | 184 V8RuntimeAgent::Inspectable* V8InspectorSessionImpl::inspectedObject(unsigned nu
m) |
185 { | 185 { |
186 if (num >= m_inspectedObjects.size()) | 186 if (num >= m_inspectedObjects.size()) |
187 return nullptr; | 187 return nullptr; |
188 return m_inspectedObjects[num].get(); | 188 return m_inspectedObjects[num].get(); |
189 } | 189 } |
190 | 190 |
191 void V8InspectorSessionImpl::schedulePauseOnNextStatement(const String16& breakR
eason, PassOwnPtr<protocol::DictionaryValue> data) | 191 void V8InspectorSessionImpl::schedulePauseOnNextStatement(const String16& breakR
eason, PassOwnPtr<protocol::DictionaryValue> data) |
192 { | 192 { |
193 m_debuggerAgent->schedulePauseOnNextStatement(breakReason, data); | 193 m_debuggerAgent->schedulePauseOnNextStatement(breakReason, std::move(data)); |
194 } | 194 } |
195 | 195 |
196 void V8InspectorSessionImpl::cancelPauseOnNextStatement() | 196 void V8InspectorSessionImpl::cancelPauseOnNextStatement() |
197 { | 197 { |
198 m_debuggerAgent->cancelPauseOnNextStatement(); | 198 m_debuggerAgent->cancelPauseOnNextStatement(); |
199 } | 199 } |
200 | 200 |
201 void V8InspectorSessionImpl::breakProgram(const String16& breakReason, PassOwnPt
r<protocol::DictionaryValue> data) | 201 void V8InspectorSessionImpl::breakProgram(const String16& breakReason, PassOwnPt
r<protocol::DictionaryValue> data) |
202 { | 202 { |
203 m_debuggerAgent->breakProgram(breakReason, data); | 203 m_debuggerAgent->breakProgram(breakReason, std::move(data)); |
204 } | 204 } |
205 | 205 |
206 void V8InspectorSessionImpl::breakProgramOnException(const String16& breakReason
, PassOwnPtr<protocol::DictionaryValue> data) | 206 void V8InspectorSessionImpl::breakProgramOnException(const String16& breakReason
, PassOwnPtr<protocol::DictionaryValue> data) |
207 { | 207 { |
208 m_debuggerAgent->breakProgramOnException(breakReason, data); | 208 m_debuggerAgent->breakProgramOnException(breakReason, std::move(data)); |
209 } | 209 } |
210 | 210 |
211 void V8InspectorSessionImpl::setSkipAllPauses(bool skip) | 211 void V8InspectorSessionImpl::setSkipAllPauses(bool skip) |
212 { | 212 { |
213 ErrorString errorString; | 213 ErrorString errorString; |
214 m_debuggerAgent->setSkipAllPauses(&errorString, skip); | 214 m_debuggerAgent->setSkipAllPauses(&errorString, skip); |
215 } | 215 } |
216 | 216 |
217 void V8InspectorSessionImpl::asyncTaskScheduled(const String16& taskName, void*
task, bool recurring) | 217 void V8InspectorSessionImpl::asyncTaskScheduled(const String16& taskName, void*
task, bool recurring) |
218 { | 218 { |
(...skipping 14 matching lines...) Expand all Loading... |
233 { | 233 { |
234 m_debuggerAgent->asyncTaskFinished(task); | 234 m_debuggerAgent->asyncTaskFinished(task); |
235 } | 235 } |
236 | 236 |
237 void V8InspectorSessionImpl::allAsyncTasksCanceled() | 237 void V8InspectorSessionImpl::allAsyncTasksCanceled() |
238 { | 238 { |
239 m_debuggerAgent->allAsyncTasksCanceled(); | 239 m_debuggerAgent->allAsyncTasksCanceled(); |
240 } | 240 } |
241 | 241 |
242 } // namespace blink | 242 } // namespace blink |
OLD | NEW |