| 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/String16.h" | 7 #include "platform/inspector_protocol/String16.h" |
| 8 #include "platform/inspector_protocol/Values.h" | 8 #include "platform/inspector_protocol/Values.h" |
| 9 #include "platform/v8_inspector/InjectedScript.h" | 9 #include "platform/v8_inspector/InjectedScript.h" |
| 10 #include "platform/v8_inspector/InspectedContext.h" | 10 #include "platform/v8_inspector/InspectedContext.h" |
| (...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 #endif | 1019 #endif |
| 1020 | 1020 |
| 1021 V8StackTraceImpl* stack = m_asyncTaskStacks.get(task); | 1021 V8StackTraceImpl* stack = m_asyncTaskStacks.get(task); |
| 1022 // Needs to support following order of events: | 1022 // Needs to support following order of events: |
| 1023 // - asyncTaskScheduled | 1023 // - asyncTaskScheduled |
| 1024 // <-- attached here --> | 1024 // <-- attached here --> |
| 1025 // - asyncTaskStarted | 1025 // - asyncTaskStarted |
| 1026 // - asyncTaskCanceled <-- canceled before finished | 1026 // - asyncTaskCanceled <-- canceled before finished |
| 1027 // <-- async stack requested here --> | 1027 // <-- async stack requested here --> |
| 1028 // - asyncTaskFinished | 1028 // - asyncTaskFinished |
| 1029 m_currentStacks.append(stack ? stack->clone() : nullptr); | 1029 m_currentStacks.append(stack ? stack->cloneImpl() : nullptr); |
| 1030 } | 1030 } |
| 1031 | 1031 |
| 1032 void V8DebuggerAgentImpl::asyncTaskFinished(void* task) | 1032 void V8DebuggerAgentImpl::asyncTaskFinished(void* task) |
| 1033 { | 1033 { |
| 1034 if (!m_maxAsyncCallStackDepth) | 1034 if (!m_maxAsyncCallStackDepth) |
| 1035 return; | 1035 return; |
| 1036 // We could start instrumenting half way and the stack is empty. | 1036 // We could start instrumenting half way and the stack is empty. |
| 1037 if (!m_currentStacks.size()) | 1037 if (!m_currentStacks.size()) |
| 1038 return; | 1038 return; |
| 1039 | 1039 |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1446 if (!enabled()) | 1446 if (!enabled()) |
| 1447 return; | 1447 return; |
| 1448 m_scheduledDebuggerStep = NoStep; | 1448 m_scheduledDebuggerStep = NoStep; |
| 1449 m_scripts.clear(); | 1449 m_scripts.clear(); |
| 1450 m_blackboxedPositions.clear(); | 1450 m_blackboxedPositions.clear(); |
| 1451 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1451 m_breakpointIdToDebuggerBreakpointIds.clear(); |
| 1452 allAsyncTasksCanceled(); | 1452 allAsyncTasksCanceled(); |
| 1453 } | 1453 } |
| 1454 | 1454 |
| 1455 } // namespace blink | 1455 } // namespace blink |
| OLD | NEW |