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

LibJS: Match spec behaviour in TypedArray.prototype.fill

This just replaces an instance where TRY was used when MUST should
have been, reflecting the difference between ? and ! in the spec.
This commit is contained in:
Jamie Mansfield 2022-11-19 11:49:40 +00:00 committed by Linus Groh
parent d492887dcd
commit d7654aebd7

View file

@ -463,7 +463,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::fill)
for (; k < final; ++k) {
// a. Let Pk be ! ToString(𝔽(k)).
// b. Perform ! Set(O, Pk, value, true).
TRY(typed_array->set(k, value, Object::ShouldThrowExceptions::Yes));
MUST(typed_array->set(k, value, Object::ShouldThrowExceptions::Yes));
// c. Set k to k + 1.
}