OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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-agent-impl.h" | 5 #include "src/inspector/v8-debugger-agent-impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
| 9 #include "src/debug/debug-interface.h" |
9 #include "src/inspector/injected-script.h" | 10 #include "src/inspector/injected-script.h" |
10 #include "src/inspector/inspected-context.h" | 11 #include "src/inspector/inspected-context.h" |
11 #include "src/inspector/java-script-call-frame.h" | 12 #include "src/inspector/java-script-call-frame.h" |
12 #include "src/inspector/protocol/Protocol.h" | 13 #include "src/inspector/protocol/Protocol.h" |
13 #include "src/inspector/remote-object-id.h" | 14 #include "src/inspector/remote-object-id.h" |
14 #include "src/inspector/script-breakpoint.h" | 15 #include "src/inspector/script-breakpoint.h" |
15 #include "src/inspector/search-util.h" | 16 #include "src/inspector/search-util.h" |
16 #include "src/inspector/string-util.h" | 17 #include "src/inspector/string-util.h" |
17 #include "src/inspector/v8-debugger-script.h" | 18 #include "src/inspector/v8-debugger-script.h" |
18 #include "src/inspector/v8-debugger.h" | 19 #include "src/inspector/v8-debugger.h" |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 } | 908 } |
908 } | 909 } |
909 | 910 |
910 std::unique_ptr<Array<CallFrame>> V8DebuggerAgentImpl::currentCallFrames( | 911 std::unique_ptr<Array<CallFrame>> V8DebuggerAgentImpl::currentCallFrames( |
911 ErrorString* errorString) { | 912 ErrorString* errorString) { |
912 if (m_pausedContext.IsEmpty() || !m_pausedCallFrames.size()) | 913 if (m_pausedContext.IsEmpty() || !m_pausedCallFrames.size()) |
913 return Array<CallFrame>::create(); | 914 return Array<CallFrame>::create(); |
914 ErrorString ignored; | 915 ErrorString ignored; |
915 v8::HandleScope handles(m_isolate); | 916 v8::HandleScope handles(m_isolate); |
916 v8::Local<v8::Context> debuggerContext = | 917 v8::Local<v8::Context> debuggerContext = |
917 v8::Debug::GetDebugContext(m_isolate); | 918 v8::DebugInterface::GetDebugContext(m_isolate); |
918 v8::Context::Scope contextScope(debuggerContext); | 919 v8::Context::Scope contextScope(debuggerContext); |
919 | 920 |
920 v8::Local<v8::Array> objects = v8::Array::New(m_isolate); | 921 v8::Local<v8::Array> objects = v8::Array::New(m_isolate); |
921 | 922 |
922 for (size_t frameOrdinal = 0; frameOrdinal < m_pausedCallFrames.size(); | 923 for (size_t frameOrdinal = 0; frameOrdinal < m_pausedCallFrames.size(); |
923 ++frameOrdinal) { | 924 ++frameOrdinal) { |
924 const std::unique_ptr<JavaScriptCallFrame>& currentCallFrame = | 925 const std::unique_ptr<JavaScriptCallFrame>& currentCallFrame = |
925 m_pausedCallFrames[frameOrdinal]; | 926 m_pausedCallFrames[frameOrdinal]; |
926 | 927 |
927 v8::Local<v8::Object> details = currentCallFrame->details(); | 928 v8::Local<v8::Object> details = currentCallFrame->details(); |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 | 1247 |
1247 void V8DebuggerAgentImpl::reset() { | 1248 void V8DebuggerAgentImpl::reset() { |
1248 if (!enabled()) return; | 1249 if (!enabled()) return; |
1249 m_scheduledDebuggerStep = NoStep; | 1250 m_scheduledDebuggerStep = NoStep; |
1250 m_scripts.clear(); | 1251 m_scripts.clear(); |
1251 m_blackboxedPositions.clear(); | 1252 m_blackboxedPositions.clear(); |
1252 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1253 m_breakpointIdToDebuggerBreakpointIds.clear(); |
1253 } | 1254 } |
1254 | 1255 |
1255 } // namespace v8_inspector | 1256 } // namespace v8_inspector |
OLD | NEW |