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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 V8DebuggerAgentImpl::currentAsyncStackTrace() { | 1028 V8DebuggerAgentImpl::currentAsyncStackTrace() { |
1029 std::shared_ptr<AsyncStackTrace> asyncParent = | 1029 std::shared_ptr<AsyncStackTrace> asyncParent = |
1030 m_debugger->currentAsyncParent(); | 1030 m_debugger->currentAsyncParent(); |
1031 if (!asyncParent) return nullptr; | 1031 if (!asyncParent) return nullptr; |
1032 return asyncParent->buildInspectorObject( | 1032 return asyncParent->buildInspectorObject( |
1033 m_debugger->currentAsyncCreation().get(), | 1033 m_debugger->currentAsyncCreation().get(), |
1034 m_debugger->maxAsyncCallChainDepth() - 1); | 1034 m_debugger->maxAsyncCallChainDepth() - 1); |
1035 } | 1035 } |
1036 | 1036 |
1037 bool V8DebuggerAgentImpl::isPaused() const { | 1037 bool V8DebuggerAgentImpl::isPaused() const { |
1038 // TODO(dgozman): this check allows once context group to resume the other, | 1038 return m_debugger->isPausedInContextGroup(m_session->contextGroupId()); |
1039 // since they share debugger. | |
1040 return m_debugger->isPaused(); | |
1041 } | 1039 } |
1042 | 1040 |
1043 void V8DebuggerAgentImpl::didParseSource( | 1041 void V8DebuggerAgentImpl::didParseSource( |
1044 std::unique_ptr<V8DebuggerScript> script, bool success) { | 1042 std::unique_ptr<V8DebuggerScript> script, bool success) { |
1045 v8::HandleScope handles(m_isolate); | 1043 v8::HandleScope handles(m_isolate); |
1046 String16 scriptSource = script->source(); | 1044 String16 scriptSource = script->source(); |
1047 if (!success) script->setSourceURL(findSourceURL(scriptSource, false)); | 1045 if (!success) script->setSourceURL(findSourceURL(scriptSource, false)); |
1048 if (!success) | 1046 if (!success) |
1049 script->setSourceMappingURL(findSourceMapURL(scriptSource, false)); | 1047 script->setSourceMappingURL(findSourceMapURL(scriptSource, false)); |
1050 | 1048 |
(...skipping 232 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 |