summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Mansfield <jmansfield@cadixdev.org>2022-11-19 11:49:40 +0000
committerLinus Groh <mail@linusgroh.de>2022-11-19 14:23:28 +0000
commitd7654aebd7e6c749c535e12c6f3f6cd7c6fb28f4 (patch)
treec666b72fab0870c9cd0aaf94bef3a07be1954e34
parentd492887dcd56bda596526641eac89932af15d900 (diff)
downloadserenity-d7654aebd7e6c749c535e12c6f3f6cd7c6fb28f4.zip
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.
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
index 412b30e697..168344f577 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
@@ -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.
}