summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp')
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
index 699dc19690..4fbfddbec9 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
@@ -388,9 +388,7 @@ Optional<Wasm::Value> to_webassembly_value(JS::Value value, const Wasm::ValueTyp
switch (type.kind()) {
case Wasm::ValueType::I64: {
- auto bigint = value.to_bigint(global_object);
- if (vm.exception())
- return {};
+ auto bigint = TRY_OR_DISCARD(value.to_bigint(global_object));
auto value = bigint->big_integer().divided_by(two_64).remainder;
VERIFY(value.unsigned_value().trimmed_length() <= 2);
i64 integer = static_cast<i64>(value.unsigned_value().to_u64());