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

Add a note that IteratorClose is intentionally not called? #81

Closed
anba opened this issue Jan 11, 2023 · 3 comments · Fixed by #85
Closed

Add a note that IteratorClose is intentionally not called? #81

anba opened this issue Jan 11, 2023 · 3 comments · Fixed by #85

Comments

@anba
Copy link

anba commented Jan 11, 2023

Set.prototype.isSupersetOf and Set.prototype.isDisjointFrom don't call IteratorClose, but instead directly return after calling SetDataHas. If this is intentional, it should probably be explicitly noted.

@bakkot
Copy link
Collaborator

bakkot commented Jan 11, 2023

That was an oversight. In fact it looks like I actually neglected to call it ever, not just those two methods. Is there something special about those two?

Either way I think the right thing will be to call it in every method that calls GetKeysIterator. That's kind of annoying but I think it's the right behavior.

@anba
Copy link
Author

anba commented Jan 11, 2023

The other callers don't have any early returns and also don't have any abrupt completions (except for IteratorStep and IteratorValue, which are ignored for IteratorClose).

@bakkot
Copy link
Collaborator

bakkot commented Jan 11, 2023

Ah, yes, thanks.

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.

2 participants