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 6648696593259e72eb725c292d43d5de4ec48342..c400102ea9459f704b16fc43386dc8fdea95fa0a 100644 |
--- a/src/inspector/v8-debugger-agent-impl.cc |
+++ b/src/inspector/v8-debugger-agent-impl.cc |
@@ -1135,20 +1135,27 @@ void V8DebuggerAgentImpl::didParseSource( |
const bool* isLiveEditParam = isLiveEdit ? &isLiveEdit : nullptr; |
const bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : nullptr; |
const bool* isModuleParam = isModule ? &isModule : nullptr; |
- if (success) |
+ if (success) { |
+ std::unique_ptr<V8StackTraceImpl> stack = |
+ V8StackTraceImpl::capture(m_inspector->debugger(), contextGroupId, |
dgozman
2017/03/16 18:39:03
Do we need the whole stack? Maybe just a top frame
allada
2017/03/16 21:02:12
Per our offline discussion, capturing 1 frame was
|
+ V8StackTraceImpl::maxCallStackSizeToCapture); |
+ std::unique_ptr<protocol::Runtime::StackTrace> stackTrace = |
+ stack && !stack->isEmpty() ? stack->buildInspectorObjectImpl() |
+ : nullptr; |
m_frontend.scriptParsed( |
scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), |
scriptRef->endLine(), scriptRef->endColumn(), contextId, |
scriptRef->hash(), std::move(executionContextAuxDataParam), |
isLiveEditParam, std::move(sourceMapURLParam), hasSourceURLParam, |
- isModuleParam, scriptRef->source().length()); |
- else |
+ isModuleParam, scriptRef->source().length(), std::move(stackTrace)); |
kozy
2017/03/16 18:35:12
let's do the same for scriptFailedToParse.
allada
2017/03/16 21:02:12
Done.
|
+ } else { |
m_frontend.scriptFailedToParse( |
scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), |
scriptRef->endLine(), scriptRef->endColumn(), contextId, |
scriptRef->hash(), std::move(executionContextAuxDataParam), |
std::move(sourceMapURLParam), hasSourceURLParam, isModuleParam, |
scriptRef->source().length()); |
dgozman
2017/03/16 18:39:04
It makes sense to send it for syntax errors as wel
allada
2017/03/16 21:02:12
Done.
|
+ } |
if (scriptURL.isEmpty() || !success) return; |