OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 "src/inspector/v8-debugger.h" | 5 #include "src/inspector/v8-debugger.h" |
6 | 6 |
7 #include "src/inspector/debugger-script.h" | 7 #include "src/inspector/debugger-script.h" |
8 #include "src/inspector/inspected-context.h" | 8 #include "src/inspector/inspected-context.h" |
9 #include "src/inspector/protocol/Protocol.h" | 9 #include "src/inspector/protocol/Protocol.h" |
10 #include "src/inspector/script-breakpoint.h" | 10 #include "src/inspector/script-breakpoint.h" |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 bool V8Debugger::shouldContinueToCurrentLocation() { | 445 bool V8Debugger::shouldContinueToCurrentLocation() { |
446 if (m_continueToLocationTargetCallFrames == | 446 if (m_continueToLocationTargetCallFrames == |
447 protocol::Debugger::ContinueToLocation::TargetCallFramesEnum::Any) { | 447 protocol::Debugger::ContinueToLocation::TargetCallFramesEnum::Any) { |
448 return true; | 448 return true; |
449 } | 449 } |
450 std::unique_ptr<V8StackTraceImpl> currentStack = captureStackTrace(true); | 450 std::unique_ptr<V8StackTraceImpl> currentStack = captureStackTrace(true); |
451 if (m_continueToLocationTargetCallFrames == | 451 if (m_continueToLocationTargetCallFrames == |
452 protocol::Debugger::ContinueToLocation::TargetCallFramesEnum::Current) { | 452 protocol::Debugger::ContinueToLocation::TargetCallFramesEnum::Current) { |
453 return m_continueToLocationStack->isEqualIgnoringTopFrame( | 453 return m_continueToLocationStack->isEqualIgnoringTopFrame( |
454 currentStack.get()); | 454 currentStack.get()); |
| 455 } else { |
| 456 DCHECK( |
| 457 m_continueToLocationStrategy == |
| 458 protocol::Debugger::ContinueToLocation::TargetCallFramesEnum::Deeper); |
| 459 return m_continueToLocationStack->isPrefix(currentStack.get()); |
455 } | 460 } |
456 return true; | 461 return true; |
457 } | 462 } |
458 | 463 |
459 void V8Debugger::clearContinueToLocation() { | 464 void V8Debugger::clearContinueToLocation() { |
460 if (m_continueToLocationBreakpointId.isEmpty()) return; | 465 if (m_continueToLocationBreakpointId.isEmpty()) return; |
461 removeBreakpoint(m_continueToLocationBreakpointId); | 466 removeBreakpoint(m_continueToLocationBreakpointId); |
462 m_continueToLocationBreakpointId = String16(); | 467 m_continueToLocationBreakpointId = String16(); |
463 m_continueToLocationTargetCallFrames = String16(); | 468 m_continueToLocationTargetCallFrames = String16(); |
464 m_continueToLocationStack.reset(); | 469 m_continueToLocationStack.reset(); |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 fprintf(stdout, "Async stacks count: %d\n", m_asyncStacksCount); | 1156 fprintf(stdout, "Async stacks count: %d\n", m_asyncStacksCount); |
1152 fprintf(stdout, "Scheduled async tasks: %zu\n", m_asyncTaskStacks.size()); | 1157 fprintf(stdout, "Scheduled async tasks: %zu\n", m_asyncTaskStacks.size()); |
1153 fprintf(stdout, "Created async tasks: %zu\n", | 1158 fprintf(stdout, "Created async tasks: %zu\n", |
1154 m_asyncTaskCreationStacks.size()); | 1159 m_asyncTaskCreationStacks.size()); |
1155 fprintf(stdout, "Async tasks with parent: %zu\n", m_parentTask.size()); | 1160 fprintf(stdout, "Async tasks with parent: %zu\n", m_parentTask.size()); |
1156 fprintf(stdout, "Recurring async tasks: %zu\n", m_recurringTasks.size()); | 1161 fprintf(stdout, "Recurring async tasks: %zu\n", m_recurringTasks.size()); |
1157 fprintf(stdout, "\n"); | 1162 fprintf(stdout, "\n"); |
1158 } | 1163 } |
1159 | 1164 |
1160 } // namespace v8_inspector | 1165 } // namespace v8_inspector |
OLD | NEW |