mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17: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
|
@ -116,10 +116,8 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::from)
|
|||
} else {
|
||||
array = Array::create(global_object, 0);
|
||||
}
|
||||
auto iterator = get_iterator(global_object, items, IteratorHint::Sync, using_iterator);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
auto iterator = TRY_OR_DISCARD(get_iterator(global_object, items, IteratorHint::Sync, using_iterator));
|
||||
auto& array_object = array.as_object();
|
||||
|
||||
size_t k = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue