1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 18:27:39 +00:00

LibJS: Implement IteratorClose with Completions and align to the spec

This commit is contained in:
Timothy Flynn 2021-10-20 13:36:14 -04:00 committed by Linus Groh
parent 04b4307b3d
commit ec54a7b5b0
8 changed files with 97 additions and 79 deletions

View file

@ -25,7 +25,7 @@ ThrowCompletionOr<Object*> iterator_next(Object& iterator, Value value = {});
ThrowCompletionOr<Object*> iterator_step(GlobalObject&, Object& iterator);
ThrowCompletionOr<bool> iterator_complete(GlobalObject&, Object& iterator_result);
ThrowCompletionOr<Value> iterator_value(GlobalObject&, Object& iterator_result);
void iterator_close(Object& iterator);
Completion iterator_close(Object& iterator, Completion completion);
Object* create_iterator_result_object(GlobalObject&, Value value, bool done);
MarkedValueList iterable_to_list(GlobalObject&, Value iterable, Value method = {});