mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
LibJS: Add spec comment to length_of_array_like()
This commit is contained in:
parent
e4b388ea5a
commit
d51ab20aaa
1 changed files with 2 additions and 2 deletions
|
@ -88,8 +88,8 @@ ThrowCompletionOr<Object*> construct_impl(VM& vm, FunctionObject& function, Opti
|
||||||
// 7.3.19 LengthOfArrayLike ( obj ), https://tc39.es/ecma262/#sec-lengthofarraylike
|
// 7.3.19 LengthOfArrayLike ( obj ), https://tc39.es/ecma262/#sec-lengthofarraylike
|
||||||
ThrowCompletionOr<size_t> length_of_array_like(VM& vm, Object const& object)
|
ThrowCompletionOr<size_t> length_of_array_like(VM& vm, Object const& object)
|
||||||
{
|
{
|
||||||
auto result = TRY(object.get(vm.names.length));
|
// 1. Return ℝ(? ToLength(? Get(obj, "length"))).
|
||||||
return result.to_length(vm);
|
return TRY(object.get(vm.names.length)).to_length(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 7.3.20 CreateListFromArrayLike ( obj [ , elementTypes ] ), https://tc39.es/ecma262/#sec-createlistfromarraylike
|
// 7.3.20 CreateListFromArrayLike ( obj [ , elementTypes ] ), https://tc39.es/ecma262/#sec-createlistfromarraylike
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue