1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 02:47:34 +00:00

LibJS: Avoid creating String object wrappers in iterator helpers

This is a normative change in the Iterator Helpers spec. See:
3e275cf
This commit is contained in:
Timothy Flynn 2023-07-12 15:45:05 -04:00 committed by Linus Groh
parent acd8c94e88
commit ff4e0d2943
5 changed files with 39 additions and 18 deletions

View file

@ -35,7 +35,12 @@ private:
IteratorRecord m_iterated; // [[Iterated]]
};
enum class StringHandling {
IterateStrings,
RejectStrings,
};
ThrowCompletionOr<IteratorRecord> get_iterator_direct(VM&, Object&);
ThrowCompletionOr<IteratorRecord> get_iterator_flattenable(VM&, Value);
ThrowCompletionOr<IteratorRecord> get_iterator_flattenable(VM&, Value, StringHandling);
}