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:
parent
3bb15d3dae
commit
b1870bc47b
Notes:
sideshowbarker
2024-07-17 00:47:29 +09:00
Author: https://github.com/shannonbooth
Commit: b1870bc47b
Pull-request: https://github.com/SerenityOS/serenity/pull/19702
Reviewed-by: https://github.com/linusg ✅
6 changed files with 13 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue