Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(755)

Unified Diff: src/inspector/v8-debugger-agent-impl.cc

Issue 2755863002: [Devtools] Add stacktrace to protocol for scriptParsed event (Closed)
Patch Set: fix tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/js_protocol.json ('k') | test/inspector/debugger/script-on-after-compile.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4bcb0c772ee4f8a05dd535d76e9210b7ecfe516a 100644
--- a/src/inspector/v8-debugger-agent-impl.cc
+++ b/src/inspector/v8-debugger-agent-impl.cc
@@ -1135,20 +1135,25 @@ void V8DebuggerAgentImpl::didParseSource(
const bool* isLiveEditParam = isLiveEdit ? &isLiveEdit : nullptr;
const bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : nullptr;
const bool* isModuleParam = isModule ? &isModule : nullptr;
- if (success)
+ std::unique_ptr<V8StackTraceImpl> stack =
+ V8StackTraceImpl::capture(m_inspector->debugger(), contextGroupId, 1);
+ std::unique_ptr<protocol::Runtime::StackTrace> stackTrace =
+ stack && !stack->isEmpty() ? stack->buildInspectorObjectImpl() : nullptr;
+ if (success) {
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));
+ } 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());
+ scriptRef->source().length(), std::move(stackTrace));
+ }
if (scriptURL.isEmpty() || !success) return;
« no previous file with comments | « src/inspector/js_protocol.json ('k') | test/inspector/debugger/script-on-after-compile.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698