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