1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

LibJS: Convert GetIterator AO to ThrowCompletionOr

This commit is contained in:
Timothy Flynn 2021-10-20 08:24:54 -04:00 committed by Linus Groh
parent a3b3800cd4
commit 860a37640b
9 changed files with 56 additions and 48 deletions

View file

@ -276,9 +276,7 @@ ThrowCompletionOr<Vector<String>> string_list_from_iterable(GlobalObject& global
}
// 2. Let iteratorRecord be ? GetIterator(iterable).
auto* iterator_record = get_iterator(global_object, iterable);
if (auto* exception = vm.exception())
return throw_completion(exception->value());
auto* iterator_record = TRY(get_iterator(global_object, iterable));
// 3. Let list be a new empty List.
Vector<String> list;