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

Unified Diff: src/js/promise.js

Issue 2578923002: [inspector] async stacks for Promise.then calls... (Closed)
Patch Set: use set_private instead of weak map 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 d66ae1a9ca40b293886ba6745ab866e7b94f3042..ec50f11d22d20ed165848df24eaedc12d743d6a6 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];

Powered by Google App Engine
This is Rietveld 408576698