LibJS: Convert Object::construct() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-14 19:18:10 +00:00 committed by Tim Flynn
parent 03acbf0beb
commit 6ae79a84df
Notes: sideshowbarker 2024-07-17 07:20:49 +09:00
117 changed files with 216 additions and 216 deletions

View file

@ -26,7 +26,7 @@ JS::ThrowCompletionOr<JS::Value> WebAssemblyTableConstructor::call()
return vm().throw_completion<JS::TypeError>(JS::ErrorType::ConstructorWithoutNew, "WebAssembly.Table");
}
JS::ThrowCompletionOr<JS::Object*> WebAssemblyTableConstructor::construct(FunctionObject&)
JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> WebAssemblyTableConstructor::construct(FunctionObject&)
{
auto& vm = this->vm();
auto& realm = *vm.current_realm();
@ -77,7 +77,7 @@ JS::ThrowCompletionOr<JS::Object*> WebAssemblyTableConstructor::construct(Functi
for (auto& element : table.elements())
element = reference;
return vm.heap().allocate<WebAssemblyTableObject>(realm, realm, *address).ptr();
return vm.heap().allocate<WebAssemblyTableObject>(realm, realm, *address);
}
void WebAssemblyTableConstructor::initialize(JS::Realm& realm)