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

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

Issue 2357423002: Improve stack traces for async functions (Closed)
Patch Set: REbase Created 4 years, 3 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/heap-symbols.h ('k') | src/inspector/v8-stack-trace-impl.cc » ('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 e9997126eba10b98348a85b85c74d46ef7d2ad40..82d470383513f929bb142b68b21360eb029c385f 100644
--- a/src/inspector/v8-debugger.cc
+++ b/src/inspector/v8-debugger.cc
@@ -20,8 +20,10 @@ namespace {
const char stepIntoV8MethodName[] = "stepIntoStatement";
const char stepOutV8MethodName[] = "stepOutOfFunction";
static const char v8AsyncTaskEventEnqueue[] = "enqueue";
+static const char v8AsyncTaskEventEnqueueRecurring[] = "enqueueRecurring";
static const char v8AsyncTaskEventWillHandle[] = "willHandle";
static const char v8AsyncTaskEventDidHandle[] = "didHandle";
+static const char v8AsyncTaskEventCancel[] = "cancel";
inline v8::Local<v8::Boolean> v8Boolean(bool value, v8::Isolate* isolate) {
return value ? v8::True(isolate) : v8::False(isolate);
@@ -653,10 +655,14 @@ void V8Debugger::handleV8AsyncTaskEvent(v8::Local<v8::Context> context,
void* ptr = reinterpret_cast<void*>(id * 2 + 1);
if (type == v8AsyncTaskEventEnqueue)
asyncTaskScheduled(name, ptr, false);
+ else if (type == v8AsyncTaskEventEnqueueRecurring)
+ asyncTaskScheduled(name, ptr, true);
else if (type == v8AsyncTaskEventWillHandle)
asyncTaskStarted(ptr);
else if (type == v8AsyncTaskEventDidHandle)
asyncTaskFinished(ptr);
+ else if (type == v8AsyncTaskEventCancel)
+ asyncTaskCanceled(ptr);
else
UNREACHABLE();
}
« no previous file with comments | « src/heap-symbols.h ('k') | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698