mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +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
|
@ -196,12 +196,7 @@ ThrowCompletionOr<void> VM::binding_initialization(NonnullRefPtr<BindingPattern>
|
|||
TRY(property_binding_initialization(*target, value, environment, global_object));
|
||||
return {};
|
||||
} else {
|
||||
auto* iterator = get_iterator(global_object, value);
|
||||
if (!iterator) {
|
||||
VERIFY(exception());
|
||||
return JS::throw_completion(exception()->value());
|
||||
}
|
||||
|
||||
auto* iterator = TRY(get_iterator(global_object, value));
|
||||
auto iterator_done = false;
|
||||
|
||||
auto result = iterator_binding_initialization(*target, iterator, iterator_done, environment, global_object);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue