00:31
<littledan>
OK, thanks for explaining, Andreu: the core issue is, if you do p.then(cb), and p is an unhandled rejection, do we get this run in the snapshot of p's rejection, or the callsite of .then. If we don't store something extra, it'd be the callsite of .then.
00:33
<littledan>
I guess this would generally also apply whenever you await a rejection, which is always like a .then call (and not even with a trivial second callback!)
00:34
<littledan>
but... this is also pretty similar to the async context where the promise was allocated, isn't it? the same issue exists when you have a bunch of async functions calling each other and there's a rejection on the inside. Isn't it the outermost promise that's the "unhandled rejection"?
00:35
<littledan>
and so you get the outermost snapshot anyway
00:36
<littledan>
(is that the case currently?)