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

Unified Diff: src/runtime/runtime-debug.cc

Issue 2578923002: [inspector] async stacks for Promise.then calls... (Closed)
Patch Set: added missing handle scope Created 4 years 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
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index ba520eb43b60c532d8d3e6d7e3cd9c272e38fbca..0a2024167f7e00893156e2111dfd5a7404b4de84 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -1892,7 +1892,6 @@ RUNTIME_FUNCTION(Runtime_DebugPushPromise) {
return isolate->heap()->undefined_value();
}
-
RUNTIME_FUNCTION(Runtime_DebugPopPromise) {
DCHECK(args.length() == 0);
SealHandleScope shs(isolate);
@@ -1900,19 +1899,21 @@ RUNTIME_FUNCTION(Runtime_DebugPopPromise) {
return isolate->heap()->undefined_value();
}
-RUNTIME_FUNCTION(Runtime_DebugNextMicrotaskId) {
+RUNTIME_FUNCTION(Runtime_DebugNextAsyncTaskId) {
+ DCHECK(args.length() == 1);
HandleScope scope(isolate);
- DCHECK(args.length() == 0);
- return Smi::FromInt(isolate->GetNextDebugMicrotaskId());
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0);
+ return *isolate->debug()->NextAsyncTaskId(promise);
}
-RUNTIME_FUNCTION(Runtime_DebugAsyncTaskEvent) {
- DCHECK(args.length() == 3);
+RUNTIME_FUNCTION(Runtime_DebugEnqueueRecurringAsyncTaskEvent) {
+ DCHECK(args.length() == 2);
HandleScope scope(isolate);
- CONVERT_ARG_HANDLE_CHECKED(String, type, 0);
- CONVERT_ARG_HANDLE_CHECKED(Object, id, 1);
- CONVERT_ARG_HANDLE_CHECKED(String, name, 2);
- isolate->debug()->OnAsyncTaskEvent(type, id, name);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0);
+ CONVERT_ARG_HANDLE_CHECKED(String, name, 1);
+ isolate->debug()->OnAsyncTaskEvent(debug::EnqueueRecurring,
+ isolate->debug()->NextAsyncTaskId(promise),
+ name);
return isolate->heap()->undefined_value();
}
« src/debug/debug.cc ('K') | « src/runtime/runtime.h ('k') | src/runtime/runtime-promise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698