Status: Accepted
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium Harmony OS-All
New issue 3567 by [email protected]: Promise: Exception in executor should
not be delayed
https://code.google.com/p/v8/issues/detail?id=3567
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-initializepromise
7. Let completion be the result of calling the [[Call]] internal method of
executor with undefined as thisArgument and
(resolvingFunctions.[[Resolve]], resolvingFunctions.[[Reject]]) as
argumentsList.
8. If completion is an abrupt completion, then
a. Let status be the result of calling the [[Call]] internal method of
resolvingFunctions.[[Reject]] with undefined as thisArgument and
(completion.[[value]]) as argumentsList.
b. ReturnIfAbrupt(status).
This means that an exception in the function passed to new Promise should
cause the call to new Promise to propagate that exception out.
var ex;
try {
new Promise(function(res, rej) {
throw 42;
});
} catch (e) {
ex = e;
}
console.assert(ex === 42)
--
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.