mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
LibJS: Convert to_i32() to ThrowCompletionOr
This commit is contained in:
parent
20d990563c
commit
f6a5ff7b00
11 changed files with 47 additions and 61 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue