1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:37:35 +00:00

LibJS: Validate TypedArray when calling TypedArray.prototype.values

This commit is contained in:
Jamie Mansfield 2022-11-18 17:08:22 +00:00 committed by Linus Groh
parent 1eb15cbaf4
commit 8363225320

View file

@ -1624,9 +1624,8 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::values)
auto& realm = *vm.current_realm();
// 1. Let O be the this value.
auto* typed_array = TRY(typed_array_from_this(vm));
// FIXME 2. Perform ? ValidateTypedArray(O).
// 2. Perform ? ValidateTypedArray(O).
auto* typed_array = TRY(validate_typed_array_from_this(vm));
// 3. Return CreateArrayIterator(O, value).
return ArrayIterator::create(realm, typed_array, Object::PropertyKind::Value);