summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebAssembly
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-10-17 23:33:35 +0300
committerIdan Horowitz <idan.horowitz@gmail.com>2021-10-18 08:01:38 +0300
commitf6a5ff7b003930a1994c0f4c4a1c4b1da7c7123d (patch)
tree0a7cce77a5d3f9f81444ffb22047b4944e8be28d /Userland/Libraries/LibWeb/WebAssembly
parent20d990563cf858d51d4c6bf93a7c37317c5ecd12 (diff)
downloadserenity-f6a5ff7b003930a1994c0f4c4a1c4b1da7c7123d.zip
LibJS: Convert to_i32() to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibWeb/WebAssembly')
-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 2b49e3b74d..51e21fbdde 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyObject.cpp
@@ -397,9 +397,7 @@ Optional<Wasm::Value> to_webassembly_value(JS::Value value, const Wasm::ValueTyp
return Wasm::Value { integer };
}
case Wasm::ValueType::I32: {
- auto _i32 = value.to_i32(global_object);
- if (vm.exception())
- return {};
+ auto _i32 = TRY_OR_DISCARD(value.to_i32(global_object));
return Wasm::Value { static_cast<i32>(_i32) };
}
case Wasm::ValueType::F64: {