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
commit 8363225320
Notes: sideshowbarker 2024-07-17 04:22:46 +09:00

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);