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

Unified Diff: src/js/async-await.js

Issue 2578923002: [inspector] async stacks for Promise.then calls... (Closed)
Patch Set: async-stacks Created 3 years, 11 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
Index: src/js/async-await.js
diff --git a/src/js/async-await.js b/src/js/async-await.js
index 732d5abb94c7d4e64b36f0a008887534d65a4c22..a9d70eb03e0335cd20e800d2f88a00bd58d1f713 100644
--- a/src/js/async-await.js
+++ b/src/js/async-await.js
@@ -14,7 +14,6 @@
var AsyncFunctionNext;
var AsyncFunctionThrow;
var PromiseCreate;
-var PromiseNextMicrotaskID;
var RejectPromise;
utils.Import(function(from) {
@@ -24,8 +23,6 @@ utils.Import(function(from) {
RejectPromise = from.RejectPromise;
});
-var promiseAsyncStackIDSymbol =
- utils.ImportNow("promise_async_stack_id_symbol");
var promiseHandledBySymbol =
utils.ImportNow("promise_handled_by_symbol");
var promiseForwardingHandlerSymbol =
@@ -124,26 +121,15 @@ function AsyncFunctionPromiseCreate() {
// Push the Promise under construction in an async function on
// the catch prediction stack to handle exceptions thrown before
// the first await.
- %DebugPushPromise(promise);
// Assign ID and create a recurring task to save stack for future
// resumptions from await.
- var id = %DebugNextMicrotaskId();
- SET_PRIVATE(promise, promiseAsyncStackIDSymbol, id);
- %DebugAsyncTaskEvent(kEnqueueRecurring, id, kAsyncFunction);
+ %DebugAsyncFunctionPromiseCreated(promise);
}
return promise;
}
function AsyncFunctionPromiseRelease(promise) {
if (DEBUG_IS_ACTIVE) {
- // Cancel
- var id = GET_PRIVATE(promise, promiseAsyncStackIDSymbol);
-
- // Don't send invalid events when catch prediction is turned on in
- // the middle of some async operation.
- if (!IS_UNDEFINED(id)) {
- %DebugAsyncTaskEvent(kCancel, id, kAsyncFunction);
- }
// Pop the Promise under construction in an async function on
// from catch prediction stack.
%DebugPopPromise();

Powered by Google App Engine
This is Rietveld 408576698