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.
This commit is contained in:
parent
b9fc9aeba1
commit
e70624de9f
Notes:
sideshowbarker
2024-07-17 07:55:01 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/e70624de9f Pull-request: https://github.com/SerenityOS/serenity/pull/14988
1 changed files with 0 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue