1
Fork 0
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:
Idan Horowitz 2021-09-21 21:59:49 +03:00
parent 02a88c5063
commit e90e4ac1e2
11 changed files with 55 additions and 126 deletions

View file

@ -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()) {