| 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/debug/debug-interface.h" |
| 10 #include "src/inspector/injected-script.h" | 10 #include "src/inspector/injected-script.h" |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 v8::debug::GetDebugContext(m_isolate); | 937 v8::debug::GetDebugContext(m_isolate); |
| 938 v8::Context::Scope contextScope(debuggerContext); | 938 v8::Context::Scope contextScope(debuggerContext); |
| 939 | 939 |
| 940 v8::Local<v8::Array> objects = v8::Array::New(m_isolate); | 940 v8::Local<v8::Array> objects = v8::Array::New(m_isolate); |
| 941 | 941 |
| 942 for (size_t frameOrdinal = 0; frameOrdinal < m_pausedCallFrames.size(); | 942 for (size_t frameOrdinal = 0; frameOrdinal < m_pausedCallFrames.size(); |
| 943 ++frameOrdinal) { | 943 ++frameOrdinal) { |
| 944 const std::unique_ptr<JavaScriptCallFrame>& currentCallFrame = | 944 const std::unique_ptr<JavaScriptCallFrame>& currentCallFrame = |
| 945 m_pausedCallFrames[frameOrdinal]; | 945 m_pausedCallFrames[frameOrdinal]; |
| 946 | 946 |
| 947 v8::Local<v8::Object> details = currentCallFrame->details(); | 947 v8::Local<v8::Object> details; |
| 948 if (details.IsEmpty()) return Response::InternalError(); | 948 if (!currentCallFrame->details().ToLocal(&details)) |
| 949 return Response::InternalError(); |
| 949 | 950 |
| 950 int contextId = currentCallFrame->contextId(); | 951 int contextId = currentCallFrame->contextId(); |
| 951 | 952 |
| 952 InjectedScript* injectedScript = nullptr; | 953 InjectedScript* injectedScript = nullptr; |
| 953 if (contextId) m_session->findInjectedScript(contextId, injectedScript); | 954 if (contextId) m_session->findInjectedScript(contextId, injectedScript); |
| 954 | 955 |
| 955 String16 callFrameId = | 956 String16 callFrameId = |
| 956 RemoteCallFrameId::serialize(contextId, static_cast<int>(frameOrdinal)); | 957 RemoteCallFrameId::serialize(contextId, static_cast<int>(frameOrdinal)); |
| 957 if (!details | 958 if (!details |
| 958 ->Set(debuggerContext, | 959 ->Set(debuggerContext, |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 | 1268 |
| 1268 void V8DebuggerAgentImpl::reset() { | 1269 void V8DebuggerAgentImpl::reset() { |
| 1269 if (!enabled()) return; | 1270 if (!enabled()) return; |
| 1270 m_scheduledDebuggerStep = NoStep; | 1271 m_scheduledDebuggerStep = NoStep; |
| 1271 m_scripts.clear(); | 1272 m_scripts.clear(); |
| 1272 m_blackboxedPositions.clear(); | 1273 m_blackboxedPositions.clear(); |
| 1273 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1274 m_breakpointIdToDebuggerBreakpointIds.clear(); |
| 1274 } | 1275 } |
| 1275 | 1276 |
| 1276 } // namespace v8_inspector | 1277 } // namespace v8_inspector |
| OLD | NEW |