On 2014/04/24 14:56:51, rossberg wrote:
https://codereview.chromium.org/249503002/diff/100001/src/promise.js
File src/promise.js (right):
https://codereview.chromium.org/249503002/diff/100001/src/promise.js#newcode197
src/promise.js:197: if (!IS_SPEC_FUNCTION(deferred.reject)) {
On 2014/04/24 14:44:53, Yang wrote:
> On 2014/04/24 14:33:47, rossberg wrote:
> > Why do you have to test this case? It will throw in the 'try' below
anyway
> (and
> > be handled appropriately).
>
> Yeah, it will throw, with a TypeError 'undefined is not a function' as
> exception. The original exception is then gone. That seems unintuitive.
That may be so, but that's equally true for other errors that could come
up
from
the call. Not sure why this one justifies an exception (no pun intended).
When
delivering to the handler fails I'd say either consistently keep the
original
exception, or consistently use the inner one. (Also, this case probably
never
comes up in practice -- and I dislike introducing random special case
logic
for
cases that don't even matter. ;) )
Alright then. Let's always use the original exception.
https://codereview.chromium.org/249503002/
--
--
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.