mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 00:35:08 +00:00
LibJS: Convert length_of_array_like to ThrowCompletionOr
This commit is contained in:
parent
02a88c5063
commit
e90e4ac1e2
11 changed files with 55 additions and 126 deletions
|
@ -172,9 +172,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from)
|
|||
|
||||
auto* array_like = items.to_object(global_object);
|
||||
|
||||
auto length = length_of_array_like(global_object, *array_like);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto length = TRY_OR_DISCARD(length_of_array_like(global_object, *array_like));
|
||||
|
||||
Value array;
|
||||
if (constructor.is_constructor()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue