mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Replace GlobalObject with VM in WebAssembly AOs [Part 1/4]
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 07:53:15 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/5f1fe4b012 Pull-request: https://github.com/SerenityOS/serenity/pull/14973 Reviewed-by: https://github.com/davidot ✅
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user