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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 } | 1008 } |
1009 | 1009 |
1010 std::unique_ptr<V8StackTraceImpl> V8Debugger::captureStackTrace( | 1010 std::unique_ptr<V8StackTraceImpl> V8Debugger::captureStackTrace( |
1011 bool fullStack) { | 1011 bool fullStack) { |
1012 if (!m_isolate->InContext()) return nullptr; | 1012 if (!m_isolate->InContext()) return nullptr; |
1013 | 1013 |
1014 v8::HandleScope handles(m_isolate); | 1014 v8::HandleScope handles(m_isolate); |
1015 int contextGroupId = currentContextGroupId(); | 1015 int contextGroupId = currentContextGroupId(); |
1016 if (!contextGroupId) return nullptr; | 1016 if (!contextGroupId) return nullptr; |
1017 | 1017 |
1018 size_t stackSize = | 1018 size_t stackSize = 0; |
1019 fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; | 1019 // fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; |
1020 if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) | 1020 // if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) |
1021 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; | 1021 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; |
1022 | 1022 |
1023 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); | 1023 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); |
1024 } | 1024 } |
1025 | 1025 |
1026 int V8Debugger::currentContextGroupId() { | 1026 int V8Debugger::currentContextGroupId() { |
1027 if (!m_isolate->InContext()) return 0; | 1027 if (!m_isolate->InContext()) return 0; |
1028 return m_inspector->contextGroupId(m_isolate->GetCurrentContext()); | 1028 return m_inspector->contextGroupId(m_isolate->GetCurrentContext()); |
1029 } | 1029 } |
1030 | 1030 |
1031 } // namespace v8_inspector | 1031 } // namespace v8_inspector |
OLD | NEW |