1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

LibJS: Port Value::to_object() to NonnullGCPtr

This commit is contained in:
Linus Groh 2023-04-13 15:26:41 +02:00 committed by Andreas Kling
parent e79f5b6e85
commit f345f72b55
29 changed files with 264 additions and 263 deletions

View file

@ -236,10 +236,10 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from)
// 6. NOTE: items is not an Iterable so assume it is an array-like object.
// 7. Let arrayLike be ! ToObject(items).
auto* array_like = MUST(items.to_object(vm));
auto array_like = MUST(items.to_object(vm));
// 8. Let len be ? LengthOfArrayLike(arrayLike).
auto length = TRY(length_of_array_like(vm, *array_like));
auto length = TRY(length_of_array_like(vm, array_like));
GCPtr<Object> array;