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

Maybe tweak %WrapForValidAsyncIteratorPrototype%.return along the lines of #197 #200

Closed
bakkot opened this issue Jul 9, 2022 · 1 comment · Fixed by #215
Closed

Maybe tweak %WrapForValidAsyncIteratorPrototype%.return along the lines of #197 #200

bakkot opened this issue Jul 9, 2022 · 1 comment · Fixed by #215

Comments

@bakkot
Copy link
Collaborator

bakkot commented Jul 9, 2022

Ideally %WrapForValidAsyncIteratorPrototype%.return and %WrapForValidAsyncIteratorPrototype%.next should match as closely as possible. Right now, because of how AsyncIteratorClose is factored, %WrapForValidAsyncIteratorPrototype%.return can't just do a passthrough of the promise from the underlying iterator's .return (because its resulted is Await'd by AsyncIteratorClose). We should maybe not use AsyncIteratorClose and instead directly implement the logic so that we can pass through the promise directly, as we did in #197.

@bakkot
Copy link
Collaborator Author

bakkot commented Jul 18, 2022

If we do this change, we should make the corresponding change in the sync version, as in #205.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant