1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

LibJS: Propagate OOM from SetValueInBuffer AO

This commit is contained in:
Shannon Booth 2023-06-29 19:27:40 +12:00 committed by Linus Groh
parent 3bb15d3dae
commit b1870bc47b
6 changed files with 13 additions and 12 deletions

View file

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