mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibJS: Convert Object::construct() to NonnullGCPtr
This commit is contained in:
@@ -50,7 +50,7 @@ ThrowCompletionOr<Value> StringConstructor::call()
|
||||
}
|
||||
|
||||
// 22.1.1.1 String ( value ), https://tc39.es/ecma262/#sec-string-constructor-string-value
|
||||
ThrowCompletionOr<Object*> StringConstructor::construct(FunctionObject& new_target)
|
||||
ThrowCompletionOr<NonnullGCPtr<Object>> StringConstructor::construct(FunctionObject& new_target)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
auto& realm = *vm.current_realm();
|
||||
@@ -61,7 +61,7 @@ ThrowCompletionOr<Object*> StringConstructor::construct(FunctionObject& new_targ
|
||||
else
|
||||
primitive_string = TRY(vm.argument(0).to_primitive_string(vm));
|
||||
auto* prototype = TRY(get_prototype_from_constructor(vm, new_target, &Intrinsics::string_prototype));
|
||||
return StringObject::create(realm, *primitive_string, *prototype).ptr();
|
||||
return StringObject::create(realm, *primitive_string, *prototype);
|
||||
}
|
||||
|
||||
// 22.1.2.4 String.raw ( template, ...substitutions ), https://tc39.es/ecma262/#sec-string.raw
|
||||
|
||||
Reference in New Issue
Block a user