Re: [heycam/webidl] Make async iterator return() function after failed next (#891)

@domenic commented on this pull request.



> @@ -12543,8 +12543,13 @@ The \[[Prototype]] [=internal slot=] of an [=asynchronous iterator prototype obj
                 1.  Let |value| be |next|, [=converted to an ECMAScript value=].
                 1.  Return [=!=] [$CreateIterResultObject$](|value|, <emu-val>false</emu-val>).
         1.  Let |onFulfilled| be [=!=] [$CreateBuiltinFunction$](|fulfillSteps|, « »).
-        1.  Perform [=!=] [$PerformPromiseThen$](|nextPromise|, |onFulfilled|,
-            <emu-val>undefined</emu-val>, |nextPromiseCapability|).
+        1.  Let |rejectSteps| be the following steps, given |reason|:
+            1.  Set |object|'s [=default asynchronous iterator object/ongoing promise=] to
+                null.
+            1.  [=ECMAScript/Throw=] |reason|.

I've attempted to implement semantics that pass these test cases in the latest commit of https://github.com/jsdom/webidl2js/pull/224. If you agree that the changes there are reasonable, I'll port them over to spec text form.

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

Received on Friday, 5 June 2020 20:58:39 UTC