| 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 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1023   protocol::ErrorSupport errorSupport; | 1023   protocol::ErrorSupport errorSupport; | 
| 1024   *result = Array<CallFrame>::fromValue(protocolValue.get(), &errorSupport); | 1024   *result = Array<CallFrame>::fromValue(protocolValue.get(), &errorSupport); | 
| 1025   if (!*result) return Response::Error(errorSupport.errors()); | 1025   if (!*result) return Response::Error(errorSupport.errors()); | 
| 1026   TranslateWasmStackTraceLocations(result->get(), | 1026   TranslateWasmStackTraceLocations(result->get(), | 
| 1027                                    m_debugger->wasmTranslation()); | 1027                                    m_debugger->wasmTranslation()); | 
| 1028   return Response::OK(); | 1028   return Response::OK(); | 
| 1029 } | 1029 } | 
| 1030 | 1030 | 
| 1031 std::unique_ptr<StackTrace> V8DebuggerAgentImpl::currentAsyncStackTrace() { | 1031 std::unique_ptr<StackTrace> V8DebuggerAgentImpl::currentAsyncStackTrace() { | 
| 1032   if (!isPaused()) return nullptr; | 1032   if (!isPaused()) return nullptr; | 
| 1033   V8StackTraceImpl* stackTrace = m_debugger->currentAsyncCallChain(); | 1033   return V8StackTraceImpl::buildInspectorObjectForTail(m_debugger); | 
| 1034   return stackTrace ? stackTrace->buildInspectorObjectForTail(m_debugger) |  | 
| 1035                     : nullptr; |  | 
| 1036 } | 1034 } | 
| 1037 | 1035 | 
| 1038 bool V8DebuggerAgentImpl::isPaused() const { return m_debugger->isPaused(); } | 1036 bool V8DebuggerAgentImpl::isPaused() const { return m_debugger->isPaused(); } | 
| 1039 | 1037 | 
| 1040 void V8DebuggerAgentImpl::didParseSource( | 1038 void V8DebuggerAgentImpl::didParseSource( | 
| 1041     std::unique_ptr<V8DebuggerScript> script, bool success) { | 1039     std::unique_ptr<V8DebuggerScript> script, bool success) { | 
| 1042   v8::HandleScope handles(m_isolate); | 1040   v8::HandleScope handles(m_isolate); | 
| 1043   String16 scriptSource = script->source(); | 1041   String16 scriptSource = script->source(); | 
| 1044   if (!success) script->setSourceURL(findSourceURL(scriptSource, false)); | 1042   if (!success) script->setSourceURL(findSourceURL(scriptSource, false)); | 
| 1045   if (!success) | 1043   if (!success) | 
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1283 | 1281 | 
| 1284 void V8DebuggerAgentImpl::reset() { | 1282 void V8DebuggerAgentImpl::reset() { | 
| 1285   if (!enabled()) return; | 1283   if (!enabled()) return; | 
| 1286   m_blackboxedPositions.clear(); | 1284   m_blackboxedPositions.clear(); | 
| 1287   resetBlackboxedStateCache(); | 1285   resetBlackboxedStateCache(); | 
| 1288   m_scripts.clear(); | 1286   m_scripts.clear(); | 
| 1289   m_breakpointIdToDebuggerBreakpointIds.clear(); | 1287   m_breakpointIdToDebuggerBreakpointIds.clear(); | 
| 1290 } | 1288 } | 
| 1291 | 1289 | 
| 1292 }  // namespace v8_inspector | 1290 }  // namespace v8_inspector | 
| OLD | NEW | 
|---|