summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-14 19:18:10 +0000
committerTim Flynn <trflynn89@pm.me>2022-12-15 06:56:37 -0500
commit6ae79a84df4ded7d3580a60fce5d1fa6e1ffd44d (patch)
tree1892be6fec1f014c02524918922abe70691f69ed /Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
parent03acbf0beba6e7c07124742ab61918f712af7088 (diff)
downloadserenity-6ae79a84df4ded7d3580a60fce5d1fa6e1ffd44d.zip
LibJS: Convert Object::construct() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
index 4d58319afb..8fa851e473 100644
--- a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
@@ -275,7 +275,7 @@ ThrowCompletionOr<Value> PromiseConstructor::call()
}
// 27.2.3.1 Promise ( executor ), https://tc39.es/ecma262/#sec-promise-executor
-ThrowCompletionOr<Object*> PromiseConstructor::construct(FunctionObject& new_target)
+ThrowCompletionOr<NonnullGCPtr<Object>> PromiseConstructor::construct(FunctionObject& new_target)
{
auto& vm = this->vm();
@@ -305,7 +305,7 @@ ThrowCompletionOr<Object*> PromiseConstructor::construct(FunctionObject& new_tar
}
// 11. Return promise.
- return promise.ptr();
+ return promise;
}
// 27.2.4.1 Promise.all ( iterable ), https://tc39.es/ecma262/#sec-promise.all