Comment #59 on issue 3093 by [email protected]: Debugging promises
http://code.google.com/p/v8/issues/detail?id=3093

@#58:

Default reject handlers should count as toward being handled, I agree. But, consider this:

var p = new Promise() {
  throw new Error();
}

var q = p.then(function() {});


p is rejected, but is handled by the default reject handler in q. q is rejected through that default reject handler, but does not have any reject handler. So devtools breaks there, which is in the middle of the default reject handler. The stack trace is no helpful, since there is none outside of the internal promise implementation. It would make more sense for the developer to have the break at the throw site.

That's why the patch changes the promise-has-reject-handler check to do a tree search for non-default reject handlers. If there are only ever default reject handlers in the tree, the reject is eventually going to become uncaught. In that case, it makes sense to get devtools to break as early as possible, at the throw site.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to