mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibJS: Convert IteratorStep AO to ThrowCompletionOr
This commit is contained in:
parent
c981d7b9bd
commit
8be1caa05d
7 changed files with 12 additions and 20 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue