OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/V8DebuggerAgentImpl.h" | 5 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" |
6 | 6 |
7 #include "platform/inspector_protocol/Parser.h" | 7 #include "platform/inspector_protocol/Parser.h" |
8 #include "platform/inspector_protocol/String16.h" | 8 #include "platform/inspector_protocol/String16.h" |
9 #include "platform/inspector_protocol/Values.h" | 9 #include "platform/inspector_protocol/Values.h" |
10 #include "platform/v8_inspector/InjectedScript.h" | 10 #include "platform/v8_inspector/InjectedScript.h" |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 int columnNumber; | 390 int columnNumber; |
391 | 391 |
392 if (!parseLocation(errorString, std::move(location), &scriptId, &lineNumber,
&columnNumber)) | 392 if (!parseLocation(errorString, std::move(location), &scriptId, &lineNumber,
&columnNumber)) |
393 return; | 393 return; |
394 | 394 |
395 ScriptBreakpoint breakpoint(lineNumber, columnNumber, ""); | 395 ScriptBreakpoint breakpoint(lineNumber, columnNumber, ""); |
396 m_continueToLocationBreakpointId = m_debugger->setBreakpoint(scriptId, break
point, &lineNumber, &columnNumber); | 396 m_continueToLocationBreakpointId = m_debugger->setBreakpoint(scriptId, break
point, &lineNumber, &columnNumber); |
397 resume(errorString); | 397 resume(errorString); |
398 } | 398 } |
399 | 399 |
400 void V8DebuggerAgentImpl::getBacktrace(ErrorString* errorString, std::unique_ptr
<Array<CallFrame>>* callFrames, Maybe<StackTrace>* asyncStackTrace) | |
401 { | |
402 if (!assertPaused(errorString)) | |
403 return; | |
404 JavaScriptCallFrames frames = m_debugger->currentCallFrames(); | |
405 m_pausedCallFrames.swap(frames); | |
406 *callFrames = currentCallFrames(errorString); | |
407 if (!*callFrames) | |
408 return; | |
409 *asyncStackTrace = currentAsyncStackTrace(); | |
410 } | |
411 | |
412 bool V8DebuggerAgentImpl::isCurrentCallStackEmptyOrBlackboxed() | 400 bool V8DebuggerAgentImpl::isCurrentCallStackEmptyOrBlackboxed() |
413 { | 401 { |
414 DCHECK(enabled()); | 402 DCHECK(enabled()); |
415 JavaScriptCallFrames callFrames = m_debugger->currentCallFrames(); | 403 JavaScriptCallFrames callFrames = m_debugger->currentCallFrames(); |
416 for (size_t index = 0; index < callFrames.size(); ++index) { | 404 for (size_t index = 0; index < callFrames.size(); ++index) { |
417 if (!isCallFrameWithUnknownScriptOrBlackboxed(callFrames[index].get())) | 405 if (!isCallFrameWithUnknownScriptOrBlackboxed(callFrames[index].get())) |
418 return false; | 406 return false; |
419 } | 407 } |
420 return true; | 408 return true; |
421 } | 409 } |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 { | 1181 { |
1194 if (!enabled()) | 1182 if (!enabled()) |
1195 return; | 1183 return; |
1196 m_scheduledDebuggerStep = NoStep; | 1184 m_scheduledDebuggerStep = NoStep; |
1197 m_scripts.clear(); | 1185 m_scripts.clear(); |
1198 m_blackboxedPositions.clear(); | 1186 m_blackboxedPositions.clear(); |
1199 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1187 m_breakpointIdToDebuggerBreakpointIds.clear(); |
1200 } | 1188 } |
1201 | 1189 |
1202 } // namespace blink | 1190 } // namespace blink |
OLD | NEW |