diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/StringConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/StringConstructor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp index 6a31626521..9fd6b22f3c 100644 --- a/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringConstructor.cpp @@ -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 |