LibJS: Add spec comment to length_of_array_like()
This commit is contained in:
parent
e4b388ea5a
commit
d51ab20aaa
Notes:
sideshowbarker
2024-07-17 06:40:21 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/d51ab20aaa Pull-request: https://github.com/SerenityOS/serenity/pull/16455
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
|
||||
ThrowCompletionOr<size_t> length_of_array_like(VM& vm, Object const& object)
|
||||
{
|
||||
auto result = TRY(object.get(vm.names.length));
|
||||
return result.to_length(vm);
|
||||
// 1. Return ℝ(? ToLength(? Get(obj, "length"))).
|
||||
return TRY(object.get(vm.names.length)).to_length(vm);
|
||||
}
|
||||
|
||||
// 7.3.20 CreateListFromArrayLike ( obj [ , elementTypes ] ), https://tc39.es/ecma262/#sec-createlistfromarraylike
|
||||
|
|
Loading…
Add table
Reference in a new issue