| 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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 std::unique_ptr<V8DebuggerScript> script, bool success) { | 1049 std::unique_ptr<V8DebuggerScript> script, bool success) { |
| 1050 v8::HandleScope handles(m_isolate); | 1050 v8::HandleScope handles(m_isolate); |
| 1051 String16 scriptSource = script->source(m_isolate); | 1051 String16 scriptSource = script->source(m_isolate); |
| 1052 if (!success) script->setSourceURL(findSourceURL(scriptSource, false)); | 1052 if (!success) script->setSourceURL(findSourceURL(scriptSource, false)); |
| 1053 if (!success) | 1053 if (!success) |
| 1054 script->setSourceMappingURL(findSourceMapURL(scriptSource, false)); | 1054 script->setSourceMappingURL(findSourceMapURL(scriptSource, false)); |
| 1055 | 1055 |
| 1056 std::unique_ptr<protocol::DictionaryValue> executionContextAuxData; | 1056 std::unique_ptr<protocol::DictionaryValue> executionContextAuxData; |
| 1057 if (!script->executionContextAuxData().isEmpty()) | 1057 if (!script->executionContextAuxData().isEmpty()) |
| 1058 executionContextAuxData = protocol::DictionaryValue::cast( | 1058 executionContextAuxData = protocol::DictionaryValue::cast( |
| 1059 protocol::parseJSON(script->executionContextAuxData())); | 1059 protocol::StringUtil::parseJSON(script->executionContextAuxData())); |
| 1060 bool isLiveEdit = script->isLiveEdit(); | 1060 bool isLiveEdit = script->isLiveEdit(); |
| 1061 bool hasSourceURL = script->hasSourceURL(); | 1061 bool hasSourceURL = script->hasSourceURL(); |
| 1062 String16 scriptId = script->scriptId(); | 1062 String16 scriptId = script->scriptId(); |
| 1063 String16 scriptURL = script->sourceURL(); | 1063 String16 scriptURL = script->sourceURL(); |
| 1064 | 1064 |
| 1065 m_scripts[scriptId] = std::move(script); | 1065 m_scripts[scriptId] = std::move(script); |
| 1066 | 1066 |
| 1067 ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId); | 1067 ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId); |
| 1068 DCHECK(scriptIterator != m_scripts.end()); | 1068 DCHECK(scriptIterator != m_scripts.end()); |
| 1069 V8DebuggerScript* scriptRef = scriptIterator->second.get(); | 1069 V8DebuggerScript* scriptRef = scriptIterator->second.get(); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1266 | 1266 |
| 1267 void V8DebuggerAgentImpl::reset() { | 1267 void V8DebuggerAgentImpl::reset() { |
| 1268 if (!enabled()) return; | 1268 if (!enabled()) return; |
| 1269 m_scheduledDebuggerStep = NoStep; | 1269 m_scheduledDebuggerStep = NoStep; |
| 1270 m_scripts.clear(); | 1270 m_scripts.clear(); |
| 1271 m_blackboxedPositions.clear(); | 1271 m_blackboxedPositions.clear(); |
| 1272 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1272 m_breakpointIdToDebuggerBreakpointIds.clear(); |
| 1273 } | 1273 } |
| 1274 | 1274 |
| 1275 } // namespace v8_inspector | 1275 } // namespace v8_inspector |
| OLD | NEW |