Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make call and invoke either return an IDL value or throw. #1324

Merged
merged 2 commits into from
Jun 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -14188,12 +14188,12 @@ the special value “missing”, which represents a missing optional argument.
|callResult|.\[[Value]] to an IDL value of the same type as the operation's
return type.
1. <i id="call-user-object-operation-return">Return:</i> at this
point |completion| will be set to an ECMAScript completion value.
point |completion| will be set to an IDL value or an [=abrupt completion=].
1. [=Clean up after running a callback=] with |stored settings|.
1. [=Clean up after running script=] with |relevant settings|.
1. If |completion| is a normal completion, return |completion|.
1. If |completion| is an IDL value, return |completion|.
1. If |completion| is an [=abrupt completion=] and the operation has a [=return type=]
that is <em>not</em> a [=promise type=], return |completion|.
that is <em>not</em> a [=promise type=], throw |completion|.\[[Value]].
1. Let |rejectedPromise| be [=!=] <a abstract-op>Call</a>({{%Promise.reject%}},
{{%Promise%}}, «|completion|.\[[Value]]»).
1. Return the result of [=converted to an IDL value|converting=]
Expand Down Expand Up @@ -14276,12 +14276,12 @@ described in the previous section).
|callResult|.\[[Value]] to an IDL value of the same type as the operation's
return type.
1. <i id="invoke-return">Return:</i> at this
point |completion| will be set to an ECMAScript completion value.
point |completion| will be set to an IDL value or an [=abrupt completion=].
1. [=Clean up after running a callback=] with |stored settings|.
1. [=Clean up after running script=] with |relevant settings|.
1. If |completion| is a normal completion, return |completion|.
1. If |completion| is an IDL value, return |completion|.
1. If |completion| is an [=abrupt completion=] and the callback function has a
[=return type=] that is <em>not</em> a [=promise type=], return |completion|.
[=return type=] that is <em>not</em> a [=promise type=], throw |completion|.\[[Value]].
1. Let |rejectedPromise| be [=!=] <a abstract-op>Call</a>({{%Promise.reject%}},
{{%Promise%}}, «|completion|.\[[Value]]»).
1. Return the result of [=converted to an IDL value|converting=]
Expand Down Expand Up @@ -14318,9 +14318,10 @@ a return type that is a [=promise type=].
|callResult|.\[[Value]] to an IDL value of the same type as the operation's
return type.
1. <i id="construct-return">Return:</i> at this
point |completion| will be set to an ECMAScript completion value.
point |completion| will be set to an IDL value or an [=abrupt completion=].
1. [=Clean up after running a callback=] with |stored settings|.
1. [=Clean up after running script=] with |relevant settings|.
1. If |completion| is an [=abrupt completion=], throw |completion|.\[[Value]].
1. Return |completion|.
</div>

Expand Down