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

Unified Diff: src/inspector/v8-stack-trace-impl.cc

Issue 2868423004: Revert of [inspector] use creation stack trace as parent for async call chains (Closed)
Patch Set: Created 3 years, 7 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/v8-stack-trace-impl.h ('k') | test/inspector/debugger/async-for-await-of-promise-stack.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-stack-trace-impl.cc
diff --git a/src/inspector/v8-stack-trace-impl.cc b/src/inspector/v8-stack-trace-impl.cc
index a2a4ce1b6eb8dfae18cacff6a556b0a66754c9d3..cb509bd8e9d67614aa3a8429f2b1500eff407ed5 100644
--- a/src/inspector/v8-stack-trace-impl.cc
+++ b/src/inspector/v8-stack-trace-impl.cc
@@ -298,9 +298,14 @@
std::unique_ptr<protocol::Runtime::StackTrace>
AsyncStackTrace::buildInspectorObject(AsyncStackTrace* asyncCreation,
int maxAsyncDepth) const {
- return buildInspectorObjectCommon(m_frames, m_description,
- m_asyncParent.lock(),
- m_asyncCreation.lock(), maxAsyncDepth);
+ std::unique_ptr<protocol::Runtime::StackTrace> stackTrace =
+ buildInspectorObjectCommon(m_frames, m_description, m_asyncParent.lock(),
+ m_asyncCreation.lock(), maxAsyncDepth);
+ if (asyncCreation && !asyncCreation->isEmpty()) {
+ stackTrace->setPromiseCreationFrame(
+ asyncCreation->m_frames[0]->buildInspectorObject());
+ }
+ return stackTrace;
}
int AsyncStackTrace::contextGroupId() const { return m_contextGroupId; }
« no previous file with comments | « src/inspector/v8-stack-trace-impl.h ('k') | test/inspector/debugger/async-for-await-of-promise-stack.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698