1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00

LibJS: Convert to_i16() to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-10-17 23:44:25 +03:00
parent cc94bba5c0
commit 627b1205ce
Notes: sideshowbarker 2024-07-18 02:12:35 +09:00
3 changed files with 4 additions and 4 deletions

View file

@ -171,7 +171,7 @@ static ByteBuffer numeric_to_raw_bytes(GlobalObject& global_object, Value value,
if constexpr (sizeof(UnderlyingBufferDataType) == 4)
int_value = MUST(value.to_i32(global_object));
else if constexpr (sizeof(UnderlyingBufferDataType) == 2)
int_value = value.to_i16(global_object);
int_value = MUST(value.to_i16(global_object));
else
int_value = value.to_i8(global_object);
} else {