Chromium Code Reviews| 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 f89f2cd86a4978689df7d5aed85d09906c01ce23..0bcddd8814c55cedf75629e24f8da1553bf843d3 100644 |
| --- a/src/inspector/v8-debugger-agent-impl.cc |
| +++ b/src/inspector/v8-debugger-agent-impl.cc |
| @@ -1050,10 +1050,15 @@ void V8DebuggerAgentImpl::didParseSource( |
| if (!success) |
| script->setSourceMappingURL(findSourceMapURL(scriptSource, false)); |
| + int contextId = script->executionContextId(); |
| + int contextGroupId = m_inspector->contextGroupId(contextId); |
| + InspectedContext* inspected = |
| + m_inspector->getContext(contextGroupId, contextId); |
| std::unique_ptr<protocol::DictionaryValue> executionContextAuxData; |
| - if (!script->executionContextAuxData().isEmpty()) |
| + if (inspected) { |
|
kozy
2016/12/09 00:24:26
Could you put comment here that script can contain
dgozman
2016/12/09 22:30:48
Done.
|
| executionContextAuxData = protocol::DictionaryValue::cast( |
| - protocol::StringUtil::parseJSON(script->executionContextAuxData())); |
| + protocol::StringUtil::parseJSON(inspected->auxData())); |
| + } |
| bool isLiveEdit = script->isLiveEdit(); |
| bool hasSourceURL = script->hasSourceURL(); |
| String16 scriptId = script->scriptId(); |
| @@ -1073,17 +1078,15 @@ void V8DebuggerAgentImpl::didParseSource( |
| if (success) |
| m_frontend.scriptParsed( |
| scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), |
| - scriptRef->endLine(), scriptRef->endColumn(), |
| - scriptRef->executionContextId(), scriptRef->hash(m_isolate), |
| - std::move(executionContextAuxDataParam), isLiveEditParam, |
| - std::move(sourceMapURLParam), hasSourceURLParam); |
| + scriptRef->endLine(), scriptRef->endColumn(), contextId, |
| + scriptRef->hash(m_isolate), std::move(executionContextAuxDataParam), |
| + isLiveEditParam, std::move(sourceMapURLParam), hasSourceURLParam); |
| else |
| m_frontend.scriptFailedToParse( |
| scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), |
| - scriptRef->endLine(), scriptRef->endColumn(), |
| - scriptRef->executionContextId(), scriptRef->hash(m_isolate), |
| - std::move(executionContextAuxDataParam), std::move(sourceMapURLParam), |
| - hasSourceURLParam); |
| + scriptRef->endLine(), scriptRef->endColumn(), contextId, |
| + scriptRef->hash(m_isolate), std::move(executionContextAuxDataParam), |
| + std::move(sourceMapURLParam), hasSourceURLParam); |
| if (scriptURL.isEmpty() || !success) return; |
| @@ -1150,7 +1153,7 @@ V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::didPause( |
| if (!exception.IsEmpty()) { |
| InjectedScript* injectedScript = nullptr; |
| - m_session->findInjectedScript(V8Debugger::contextId(context), |
| + m_session->findInjectedScript(InspectedContext::contextId(context), |
| injectedScript); |
| if (injectedScript) { |
| m_breakReason = |