Index: src/inspector/v8-debugger-agent-impl.cc |
diff --git a/src/inspector/v8-debugger-agent-impl.cc b/src/inspector/v8-debugger-agent-impl.cc |
index ab4e349909865e93c5c2ecc23f888dd16a45e6da..df13624569321e92831029d606026a29670c9ce2 100644 |
--- a/src/inspector/v8-debugger-agent-impl.cc |
+++ b/src/inspector/v8-debugger-agent-impl.cc |
@@ -1027,25 +1027,31 @@ void V8DebuggerAgentImpl::didParseSource( |
String16 scriptId = script->scriptId(); |
String16 scriptURL = script->sourceURL(); |
- Maybe<String16> sourceMapURLParam = script->sourceMappingURL(); |
+ m_scripts[scriptId] = std::move(script); |
+ |
+ ScriptsMap::iterator scriptIterator = m_scripts.find(scriptId); |
+ DCHECK(scriptIterator != m_scripts.end()); |
+ V8DebuggerScript* scriptRef = scriptIterator->second.get(); |
+ |
+ Maybe<String16> sourceMapURLParam = scriptRef->sourceMappingURL(); |
Maybe<protocol::DictionaryValue> executionContextAuxDataParam( |
std::move(executionContextAuxData)); |
const bool* isLiveEditParam = isLiveEdit ? &isLiveEdit : nullptr; |
const bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : nullptr; |
if (success) |
m_frontend.scriptParsed( |
- scriptId, scriptURL, script->startLine(), script->startColumn(), |
- script->endLine(), script->endColumn(), script->executionContextId(), |
- script->hash(), std::move(executionContextAuxDataParam), |
- isLiveEditParam, std::move(sourceMapURLParam), hasSourceURLParam); |
+ scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), |
+ scriptRef->endLine(), scriptRef->endColumn(), |
+ scriptRef->executionContextId(), scriptRef->hash(), |
+ std::move(executionContextAuxDataParam), isLiveEditParam, |
+ std::move(sourceMapURLParam), hasSourceURLParam); |
else |
m_frontend.scriptFailedToParse( |
- scriptId, scriptURL, script->startLine(), script->startColumn(), |
- script->endLine(), script->endColumn(), script->executionContextId(), |
- script->hash(), std::move(executionContextAuxDataParam), |
- std::move(sourceMapURLParam), hasSourceURLParam); |
- |
- m_scripts[scriptId] = std::move(script); |
+ scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), |
+ scriptRef->endLine(), scriptRef->endColumn(), |
+ scriptRef->executionContextId(), scriptRef->hash(), |
+ std::move(executionContextAuxDataParam), std::move(sourceMapURLParam), |
+ hasSourceURLParam); |
if (scriptURL.isEmpty() || !success) return; |