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:
parent
a3b3800cd4
commit
860a37640b
9 changed files with 56 additions and 48 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue