From 39f9d51353246c42e1074ba90c9d9b95418bf91a Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 3 Sep 2019 10:19:18 +0200 Subject: [PATCH] Handle conversion failures in 'upon settling'. Fixes #782. --- index.bs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 21845cc4..dd94c3b7 100644 --- a/index.bs +++ b/index.bs @@ -8236,8 +8236,15 @@ IDL [=promise type=] values are represented by ECMAScript [=PromiseCapability=] steps: 1. Let |onFulfilledSteps| be the following steps given argument |V|: - 1. Let |value| be the result of [=converted to an IDL value|converting=] |V| to an IDL - value of type |T|. + 1. Try running the following step: + 1. Let |value| be the result of [=converted to an IDL value|converting=] |V| to an IDL + value of type |T|. + + And then, if an exception |exception| was thrown: + + 1. If there are steps that are required to be run if the promise was rejected, let + |result| be the result of performing those steps, given |exception|. + 1. [=ECMAScript/throw=] |exception|. 1. If there are no steps that are required to be run if the promise was fulfilled, then return undefined. 1. Let |result| be the result of performing any steps that were required to be run if