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

Unified Diff: src/inspector/v8-debugger.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 | « no previous file | src/inspector/v8-stack-trace-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-debugger.cc
diff --git a/src/inspector/v8-debugger.cc b/src/inspector/v8-debugger.cc
index a65cc738e34f2acc4e3f3fae9dc9acb847a1bac4..f65b590b04cf4979036a40af5a309efeeaa96065 100644
--- a/src/inspector/v8-debugger.cc
+++ b/src/inspector/v8-debugger.cc
@@ -683,15 +683,12 @@
}
std::shared_ptr<AsyncStackTrace> V8Debugger::currentAsyncParent() {
- // TODO(kozyatinskiy): implement creation chain as parent without hack.
- if (!m_currentAsyncCreation.empty() && m_currentAsyncCreation.back()) {
- return m_currentAsyncCreation.back();
- }
return m_currentAsyncParent.empty() ? nullptr : m_currentAsyncParent.back();
}
std::shared_ptr<AsyncStackTrace> V8Debugger::currentAsyncCreation() {
- return nullptr;
+ return m_currentAsyncCreation.empty() ? nullptr
+ : m_currentAsyncCreation.back();
}
void V8Debugger::compileDebuggerScript() {
@@ -859,8 +856,7 @@
if (parentTask) m_parentTask[task] = parentTask;
v8::HandleScope scope(m_isolate);
std::shared_ptr<AsyncStackTrace> asyncCreation =
- AsyncStackTrace::capture(this, currentContextGroupId(), String16(),
- V8StackTraceImpl::maxCallStackSizeToCapture);
+ AsyncStackTrace::capture(this, currentContextGroupId(), String16(), 1);
// Passing one as maxStackSize forces no async chain for the new stack.
if (asyncCreation && !asyncCreation->isEmpty()) {
m_asyncTaskCreationStacks[task] = asyncCreation;
@@ -936,12 +932,6 @@
auto itCreation = m_asyncTaskCreationStacks.find(task);
if (itCreation != m_asyncTaskCreationStacks.end()) {
m_currentAsyncCreation.push_back(itCreation->second.lock());
- // TODO(kozyatinskiy): implement it without hack.
- if (m_currentAsyncParent.back()) {
- m_currentAsyncCreation.back()->setDescription(
- m_currentAsyncParent.back()->description());
- m_currentAsyncParent.back().reset();
- }
} else {
m_currentAsyncCreation.emplace_back();
}
« no previous file with comments | « no previous file | src/inspector/v8-stack-trace-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698