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