mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibJS: Convert GetIterator AO to ThrowCompletionOr
This commit is contained in:
committed by
Linus Groh
parent
a3b3800cd4
commit
860a37640b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user