1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

LibJS: Convert IteratorStep AO to ThrowCompletionOr

This commit is contained in:
Timothy Flynn 2021-10-20 08:56:01 -04:00 committed by Linus Groh
parent c981d7b9bd
commit 8be1caa05d
7 changed files with 12 additions and 20 deletions

View file

@ -287,9 +287,7 @@ ThrowCompletionOr<Vector<String>> string_list_from_iterable(GlobalObject& global
// 5. Repeat, while next is not false,
do {
// a. Set next to ? IteratorStep(iteratorRecord).
next = iterator_step(global_object, *iterator_record);
if (auto* exception = vm.exception())
return throw_completion(exception->value());
next = TRY(iterator_step(global_object, *iterator_record));
// b. If next is not false, then
if (next != nullptr) {