mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibJS: Convert to_u16() to ThrowCompletionOr
This commit is contained in:
parent
627b1205ce
commit
7bbb92dfe9
Notes:
sideshowbarker
2024-07-18 02:12:31 +09:00
Author: https://github.com/IdanHo
Commit: 7bbb92dfe9
Pull-request: https://github.com/SerenityOS/serenity/pull/10522
Reviewed-by: https://github.com/linusg ✅
5 changed files with 7 additions and 13 deletions
|
@ -178,7 +178,7 @@ static ByteBuffer numeric_to_raw_bytes(GlobalObject& global_object, Value value,
|
|||
if constexpr (sizeof(UnderlyingBufferDataType) == 4)
|
||||
int_value = MUST(value.to_u32(global_object));
|
||||
else if constexpr (sizeof(UnderlyingBufferDataType) == 2)
|
||||
int_value = value.to_u16(global_object);
|
||||
int_value = MUST(value.to_u16(global_object));
|
||||
else if constexpr (!IsSame<T, ClampedU8>)
|
||||
int_value = value.to_u8(global_object);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue