mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +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
|
@ -128,10 +128,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ArrayConstructor::from)
|
|||
return {};
|
||||
}
|
||||
|
||||
auto next = iterator_step(global_object, *iterator);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
auto* next = TRY_OR_DISCARD(iterator_step(global_object, *iterator));
|
||||
if (!next) {
|
||||
TRY_OR_DISCARD(array_object.set(vm.names.length, Value(k), Object::ShouldThrowExceptions::Yes));
|
||||
return array;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue