[whatwg/webidl] Editorial: fix uses of `?` with `IfAbruptRejectPromise` (PR #1165)

This was a typo introduced in https://github.com/whatwg/webidl/pull/1111; cc @syg. Sorry I didn't catch it at the time. Context follows but feel free to skip it.

---

[`?`](https://tc39.es/ecma262/multipage/notational-conventions.html#sec-returnifabrupt-shorthands) is a macro in the JS spec which expands to [`ReturnIfAbrupt`](https://tc39.es/ecma262/multipage/notational-conventions.html#sec-returnifabrupt) and which is used when possible errors need to get propagated immediately. In the case of non-errors it unwraps the completion record for use in later steps.

[`IfAbruptRejectPromise`](https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-ifabruptrejectpromise) is a macro in the JS spec which is used when possible errors need to get wrapped up into rejected promises. As above, in the case of non-errors it unwraps the completion record for use in later steps.

They reflect two different kinds of error handling, basically corresponding to errors which occur in sync and async functions respectively. They can't be combined for the same call, since whichever runs first will handle the error. But they were both being done in [this algorithm](https://webidl.spec.whatwg.org/#es-asynchronous-iterator-prototype-object). The behavior prior to #1111 was consistent with this PR.
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/webidl/pull/1165

-- Commit Summary --

  * fix uses of IfAbruptRejectPromise

-- File Changes --

    M index.bs (4)

-- Patch Links --

https://github.com/whatwg/webidl/pull/1165.patch
https://github.com/whatwg/webidl/pull/1165.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1165
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1165@github.com>

Received on Thursday, 7 July 2022 17:12:32 UTC