-
Notifications
You must be signed in to change notification settings - Fork 49k
[Flight] Skip the stack frame of built-in wrappers that create or await Promises #33798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0, | ||
0, | ||
0, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is on the stack of where the thing happens. Since this implementation choses to include anonymous locations, it'll also have this on the stack. However it will not have the "new Promise"
on the top of the stack.
"value": [ | ||
, | ||
], | ||
"value": undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now using the await inside the Promise.all
and its "value" is the return value of the delay (undefined). Previously, the Promise.all
call was skipped and it used the await of the Promise.all
instead. So we get the value of the last resolved I/O of the set, which is also the stack that we get.
The tradeoff is that we don't see all the values of a set if multiple things are awaited but that's not what we're modeling in this entry anyway since it won't have the time spans and stacks for earlier resolutions anyway.
d7abbb2
to
534b056
Compare
…it Promises (facebook#33798) We already do this with `"new Promise"` and `"Promise.then"`. There are also many helpers that both create promises and awaits other promises inside of it like `Promise.all`. The way this is filtered is different from just filtering out all anonymous stacks since they're used to determine where the boundary is between ignore listed and user space. Ideally we'd cover more wrappers that are internal to Promise libraries. DiffTrain build for [da7487b](facebook@da7487b)
We already do this with
"new Promise"
and"Promise.then"
. There are also many helpers that both create promises and awaits other promises inside of it likePromise.all
.The way this is filtered is different from just filtering out all anonymous stacks since they're used to determine where the boundary is between ignore listed and user space.
Ideally we'd cover more wrappers that are internal to Promise libraries.