summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-10-17 23:48:24 +0300
committerIdan Horowitz <idan.horowitz@gmail.com>2021-10-18 08:01:38 +0300
commit7bbb92dfe9af40a340092df3263efa8fd3cf611c (patch)
tree1a129be4f85cdf2e1e3ccfa055bbe57d9baf1c6d /Userland/Libraries/LibJS/Runtime/ArrayBuffer.h
parent627b1205ced61ace766bff9b486f2718cd02c26a (diff)
downloadserenity-7bbb92dfe9af40a340092df3263efa8fd3cf611c.zip
LibJS: Convert to_u16() to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ArrayBuffer.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBuffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h b/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h
index dd860f7b2a..891a5acce5 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h
@@ -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