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

Unified Diff: src/js/promise.js

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/js/promise.js
diff --git a/src/js/promise.js b/src/js/promise.js
index 35bdf188216dd4027b52dc3702b1bf57e77a3c86..039356c6d732957efc17784340d609df79017115 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -39,9 +39,8 @@ utils.Import(function(from) {
// Core functionality.
-function PromiseDebugGetInfo(deferreds, status) {
- var id, name, instrumenting = DEBUG_IS_ACTIVE;
-
+function PromiseDebugGetInfo(deferreds, status, id) {
+ var name, instrumenting = DEBUG_IS_ACTIVE;
if (instrumenting) {
// In an async function, reuse the existing stack related to the outer
// Promise. Otherwise, e.g. in a direct call to then, save a new stack.
@@ -57,9 +56,7 @@ function PromiseDebugGetInfo(deferreds, status) {
promiseAsyncStackIDSymbol);
name = "async function";
} else {
- id = %DebugNextMicrotaskId();
name = status === kFulfilled ? "Promise.resolve" : "Promise.reject";
- %DebugAsyncTaskEvent("enqueue", id, name);
}
}
return [id, name];
« src/debug/debug.cc ('K') | « src/js/async-await.js ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698