Bug 212774

Summary: AsyncGenerator should await "return" completions
Product: WebKit Reporter: Alexey Shvayka <ashvayka>
Component: JavaScriptCoreAssignee: Alexey Shvayka <ashvayka>
Status: RESOLVED FIXED    
Severity: Minor CC: ews-watchlist, joepeck, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Alexey Shvayka 2020-06-04 13:17:51 PDT
AsyncGenerator should await "return" completions
Comment 1 Alexey Shvayka 2020-06-04 13:19:52 PDT
Created attachment 401070 [details]
Patch
Comment 2 Alexey Shvayka 2020-06-05 09:32:28 PDT
Created attachment 401162 [details]
Patch

Rebase patch.
Comment 3 Yusuke Suzuki 2020-06-08 09:09:39 PDT
Comment on attachment 401162 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401162&action=review

> Source/JavaScriptCore/ChangeLog:9
> +        This change implements step 8 of AsyncGeneratorYield [1] and step 7.c.iii.1
> +        of yield* runtime semantics [2], aligning JSC with V8 and SpiderMonkey.

Can you explain more? The pointed spec text is not so clear to this change.
Comment 4 Alexey Shvayka 2020-06-11 09:15:44 PDT
Created attachment 401651 [details]
Patch

Add detailed explanation to ChangeLog.
Comment 5 Ross Kirsling 2020-06-12 15:10:27 PDT
Comment on attachment 401651 [details]
Patch

LGTM, now that I took the time to wrap my head around it. :)
Comment 6 EWS 2020-06-12 15:13:23 PDT
Committed r262979: <https://trac.webkit.org/changeset/262979>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401651 [details].
Comment 7 Radar WebKit Bug Importer 2020-06-12 15:14:17 PDT
<rdar://problem/64313960>
Comment 8 Alexey Shvayka 2020-06-12 15:18:28 PDT
(In reply to Ross Kirsling from comment #5)
> Comment on attachment 401651 [details]
> Patch
> 
> LGTM, now that I took the time to wrap my head around it. :)

This one is quite tricky: I've made a few unsuccessful attempts of adding Awaits here and there before discovering the hook at step 8.
Thank you, Ross!