summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp')
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
index 703bbd47b4..6546d01860 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
@@ -32,10 +32,7 @@ JS::Value WebAssemblyMemoryConstructor::construct(FunctionObject&)
auto& vm = this->vm();
auto& global_object = this->global_object();
- auto descriptor = vm.argument(0).to_object(global_object);
- if (vm.exception())
- return {};
-
+ auto descriptor = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
auto initial_value = TRY_OR_DISCARD(descriptor->get("initial"));
auto maximum_value = TRY_OR_DISCARD(descriptor->get("maximum"));