diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-14 19:18:10 +0000 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-12-15 06:56:37 -0500 |
commit | 6ae79a84df4ded7d3580a60fce5d1fa6e1ffd44d (patch) | |
tree | 1892be6fec1f014c02524918922abe70691f69ed /Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp | |
parent | 03acbf0beba6e7c07124742ab61918f712af7088 (diff) | |
download | serenity-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.cpp | 4 |
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 |