1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09: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
Notes: sideshowbarker 2024-07-17 00:47:29 +09:00
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;