Skip to content

Commit c3b4e97

Browse files
authored
Handle exceptions thrown while converting JS return values
1 parent 95f57dd commit c3b4e97

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

index.bs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14186,7 +14186,8 @@ the special value “missing”, which represents a missing optional argument.
1418614186
|callResult| and jump to the step labeled <a href="#call-user-object-operation-return"><i>return</i></a>.
1418714187
1. Set |completion| to the result of [=converted to an IDL value|converting=]
1418814188
|callResult|.\[[Value]] to an IDL value of the same type as the operation's
14189-
return type.
14189+
return type. If this throws an exception, set |completion| to the completion value
14190+
representing the thrown exception.
1419014191
1. <i id="call-user-object-operation-return">Return:</i> at this
1419114192
point |completion| will be set to an IDL value or an [=abrupt completion=].
1419214193
1. [=Clean up after running a callback=] with |stored settings|.
@@ -14273,8 +14274,9 @@ described in the previous section).
1427314274
1. If |callResult| is an [=abrupt completion=], set |completion| to
1427414275
|callResult| and jump to the step labeled <a href="#invoke-return"><i>return</i></a>.
1427514276
1. Set |completion| to the result of [=converted to an IDL value|converting=]
14276-
|callResult|.\[[Value]] to an IDL value of the same type as the operation's
14277-
return type.
14277+
|callResult|.\[[Value]] to an IDL value of the same type as |callable|'s
14278+
return type. If this throws an exception, set |completion| to the completion value
14279+
representing the thrown exception.
1427814280
1. <i id="invoke-return">Return:</i> at this
1427914281
point |completion| will be set to an IDL value or an [=abrupt completion=].
1428014282
1. [=Clean up after running a callback=] with |stored settings|.
@@ -14315,8 +14317,9 @@ a return type that is a [=promise type=].
1431514317
1. If |callResult| is an [=abrupt completion=], set |completion| to
1431614318
|callResult| and jump to the step labeled <a href="#construct-return"><i>return</i></a>.
1431714319
1. Set |completion| to the result of [=converted to an IDL value|converting=]
14318-
|callResult|.\[[Value]] to an IDL value of the same type as the operation's
14319-
return type.
14320+
|callResult|.\[[Value]] to an IDL value of the same type as |callable|'s
14321+
return type. If this throws an exception, set |completion| to the completion value
14322+
representing the thrown exception.
1432014323
1. <i id="construct-return">Return:</i> at this
1432114324
point |completion| will be set to an IDL value or an [=abrupt completion=].
1432214325
1. [=Clean up after running a callback=] with |stored settings|.

0 commit comments

Comments
 (0)