1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

LibJS: Remove unnecessary ThrowCompletionOr return types in TypedArray

We used to need these because we worried about tiny OOM errors.

Work towards #20449
This commit is contained in:
Andreas Kling 2023-11-26 10:33:56 +01:00
parent 1bc58333f8
commit abcf71a8ca
6 changed files with 23 additions and 24 deletions

View file

@ -381,7 +381,7 @@ JS_DEFINE_NATIVE_FUNCTION(AtomicsObject::store)
// 7. Let elementType be TypedArrayElementType(typedArray).
// 8. Perform SetValueInBuffer(buffer, indexedPosition, elementType, v, true, SeqCst).
MUST_OR_THROW_OOM(typed_array->set_value_in_buffer(indexed_position, value_to_set, ArrayBuffer::Order::SeqCst, true));
typed_array->set_value_in_buffer(indexed_position, value_to_set, ArrayBuffer::Order::SeqCst, true);
// 9. Return v.
return value_to_set;