diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-17 23:33:35 +0300 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-18 08:01:38 +0300 |
commit | f6a5ff7b003930a1994c0f4c4a1c4b1da7c7123d (patch) | |
tree | 0a7cce77a5d3f9f81444ffb22047b4944e8be28d /Userland/Libraries/LibJS/Runtime/ArrayBuffer.h | |
parent | 20d990563cf858d51d4c6bf93a7c37317c5ecd12 (diff) | |
download | serenity-f6a5ff7b003930a1994c0f4c4a1c4b1da7c7123d.zip |
LibJS: Convert to_i32() to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ArrayBuffer.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ArrayBuffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h b/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h index 94574ba837..7bceadd133 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h +++ b/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h @@ -169,7 +169,7 @@ static ByteBuffer numeric_to_raw_bytes(GlobalObject& global_object, Value value, UnderlyingBufferDataType int_value; if constexpr (IsSigned<UnderlyingBufferDataType>) { if constexpr (sizeof(UnderlyingBufferDataType) == 4) - int_value = value.to_i32(global_object); + int_value = MUST(value.to_i32(global_object)); else if constexpr (sizeof(UnderlyingBufferDataType) == 2) int_value = value.to_i16(global_object); else |