summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-08-23 16:21:03 +0430
committerLinus Groh <mail@linusgroh.de>2022-08-23 19:04:18 +0100
commite70624de9fe6124b774784576875249641777bd8 (patch)
tree74c534a68c91f9b25f4ca82bc14fb66a0f1df06f
parentb9fc9aeba179791593e9a6ca297fe3017e727501 (diff)
downloadserenity-e70624de9fe6124b774784576875249641777bd8.zip
LibWeb: Don't grow Wasm memory again after initialisation
The constructor grows the memory to the initial size, we don't need to do that again.
-rw-r--r--Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
index ea8698c57a..ea23f37cbe 100644
--- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
+++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryConstructor.cpp
@@ -47,9 +47,6 @@ JS::ThrowCompletionOr<JS::Object*> WebAssemblyMemoryConstructor::construct(Funct
if (!address.has_value())
return vm.throw_completion<JS::TypeError>("Wasm Memory allocation failed");
- if (!WebAssemblyObject::s_abstract_machine.store().get(*address)->grow(initial))
- return vm.throw_completion<JS::TypeError>(String::formatted("Wasm Memory grow failed: {}", initial));
-
return vm.heap().allocate<WebAssemblyMemoryObject>(realm, realm, *address);
}