mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 16:02:53 +00:00
LibJS+LibWeb: Replace GlobalObject with Realm in Heap::allocate<T>()
This is a continuation of the previous three commits. Now that create() receives the allocating realm, we can simply forward that to allocate(), which accounts for the majority of these changes. Additionally, we can get rid of the realm_from_global_object() in one place, with one more remaining in VM::throw_completion().
This commit is contained in:
parent
b99cc7d050
commit
e992a9f469
Notes:
sideshowbarker
2024-07-17 09:49:48 +09:00
Author: https://github.com/linusg
Commit: e992a9f469
Pull-request: https://github.com/SerenityOS/serenity/pull/14973
Reviewed-by: https://github.com/davidot ✅
82 changed files with 148 additions and 148 deletions
|
@ -51,7 +51,7 @@ JS::ThrowCompletionOr<JS::Object*> WebAssemblyMemoryConstructor::construct(Funct
|
|||
if (!WebAssemblyObject::s_abstract_machine.store().get(*address)->grow(initial))
|
||||
return vm.throw_completion<JS::TypeError>(global_object, String::formatted("Wasm Memory grow failed: {}", initial));
|
||||
|
||||
return vm.heap().allocate<WebAssemblyMemoryObject>(global_object, realm, *address);
|
||||
return vm.heap().allocate<WebAssemblyMemoryObject>(realm, realm, *address);
|
||||
}
|
||||
|
||||
void WebAssemblyMemoryConstructor::initialize(JS::Realm& realm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue