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

Unified Diff: src/debug/debug.js

Issue 2606093002: [promises] Refactor debug code (Closed)
Patch Set: fix stuff Created 3 years, 12 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/debug/debug.cc ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.js
diff --git a/src/debug/debug.js b/src/debug/debug.js
index 7c38b7e6dd77bf4bfd303a15b5691479d28f2224..0d4cd285b4514d03e22235f257ea31a1614508fb 100644
--- a/src/debug/debug.js
+++ b/src/debug/debug.js
@@ -1088,8 +1088,28 @@ function MakeScriptObject_(script, include_source) {
}
+function PromiseDebugActionNameToString(name) {
+ switch (name) {
+ case kAsyncFunction: return "async function";
+ case kPromiseResolve: return "Promise.resolve";
+ case kPromiseReject: return "Promise.reject";
+ case kPromiseResolveThenableJob: return "PromiseResolveThenableJob";
+ }
+}
+
+function PromiseDebugActionTypeToString(type) {
+ switch (type) {
+ case kEnqueue: return "enqueue";
+ case kEnqueueRecurring: return "enqueueRecurring";
+ case kCancel: return "cancel";
+ case kWillHandle: return "willHandle";
+ case kDidHandle: return "didHandle";
+ }
+}
+
function MakeAsyncTaskEvent(type, id, name) {
- return new AsyncTaskEvent(type, id, name);
+ return new AsyncTaskEvent(PromiseDebugActionTypeToString(type),
+ id, PromiseDebugActionNameToString(name));
}
« no previous file with comments | « src/debug/debug.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698