mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09:00
LibWeb: Replace GlobalObject with VM in WebAssembly AOs [Part 1/4]
This commit is contained in:
parent
40a70461a0
commit
5f1fe4b012
Notes:
sideshowbarker
2024-07-17 07:53:15 +09:00
Author: https://github.com/linusg
Commit: 5f1fe4b012
Pull-request: https://github.com/SerenityOS/serenity/pull/14973
Reviewed-by: https://github.com/davidot ✅
7 changed files with 34 additions and 37 deletions
|
@ -29,11 +29,10 @@ JS::ThrowCompletionOr<JS::Value> WebAssemblyModuleConstructor::call()
|
|||
JS::ThrowCompletionOr<JS::Object*> WebAssemblyModuleConstructor::construct(FunctionObject&)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
auto& global_object = this->global_object();
|
||||
auto& realm = *global_object.associated_realm();
|
||||
auto& realm = *vm.current_realm();
|
||||
|
||||
auto* buffer_object = TRY(vm.argument(0).to_object(vm));
|
||||
auto result = TRY(parse_module(global_object, buffer_object));
|
||||
auto result = TRY(parse_module(vm, buffer_object));
|
||||
|
||||
return heap().allocate<WebAssemblyModuleObject>(realm, realm, result);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue