From: yang...@google.com [mailto:yang...@google.com] On Behalf Of Yang Guo

> var p = new Promise(function(resolve) { resolve() });
> p.then(function() { return Promise.reject("foo"); });
>
> I'll change the CL to call the callback twice then.

Right, this is a good example. In this case I'd expect %PromiseRejectEvent 
twice and %PromiseRevokeReject once. Expanding: 

var x = Promise.resolve();
var y = p.then(function() { var z = Promise.reject("foo"); return z; });

Here I'd expect %PromiseRejectEvent(z, "foo"), then %PromiseRevokeReject(z), 
then %PromiseRejectEvent(y, "foo"). So the stable state is that you have an 
unhandled rejection for y with reason "foo", as 

Attempts to reduce the "chattiness" when you know for sure that you'll be 
revoking soon make some sense, but I'm not sure how to do that in general. E.g. 
when creating `z` I don't see how you'd know that the next line is `return z` 
within a promise-then callback.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to