mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
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:
committed by
Linus Groh
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
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user