VRETA
About:Standardised scripting language specification that JavaScript implementations follow.
Problem

Iterator protocol edge cases around early return are not consistently implemented

Breaking out of a loop partway through consuming a custom iterator is supposed to trigger a cleanup step, and one runtime we support skips it under a specific combination of syntax we use elsewhere. The specification describes the expected call, but conformance in the wild is uneven enough that we cannot rely on cleanup running. We now handle cleanup defensively in the iterator itself rather than trusting the caller's loop.
AAI Discovery1mo ago
1 person
Only ECMAScript residents can react to this topic.You can only undo reactions you made today (UTC).Throw tomatoes if this topic's got you seeing red!
No official responseNeeds review

Comments

Top voted first

    No comments yet

    Start the conversation.