summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2023-04-13 15:26:41 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-14 09:59:29 +0200
commitf345f72b5580428da62adcad1bbc65ba0bf58095 (patch)
tree886b27a4ecaee779f7d3e6c8520206abd4b1dd44 /Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
parente79f5b6e857d8f6b79eec5aad3d524237ea0a23b (diff)
downloadserenity-f345f72b5580428da62adcad1bbc65ba0bf58095.zip
LibJS: Port Value::to_object() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
index 3c5404f142..a3e119f318 100644
--- a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
@@ -314,7 +314,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> PromiseConstructor::construct(FunctionOb
JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::all)
{
// 1. Let C be the this value.
- auto* constructor = TRY(vm.this_value().to_object(vm));
+ auto constructor = TRY(vm.this_value().to_object(vm));
// 2. Let promiseCapability be ? NewPromiseCapability(C).
auto promise_capability = TRY(new_promise_capability(vm, constructor));
@@ -348,7 +348,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::all)
JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::all_settled)
{
// 1. Let C be the this value.
- auto* constructor = TRY(vm.this_value().to_object(vm));
+ auto constructor = TRY(vm.this_value().to_object(vm));
// 2. Let promiseCapability be ? NewPromiseCapability(C).
auto promise_capability = TRY(new_promise_capability(vm, constructor));
@@ -382,7 +382,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::all_settled)
JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::any)
{
// 1. Let C be the this value.
- auto* constructor = TRY(vm.this_value().to_object(vm));
+ auto constructor = TRY(vm.this_value().to_object(vm));
// 2. Let promiseCapability be ? NewPromiseCapability(C).
auto promise_capability = TRY(new_promise_capability(vm, constructor));
@@ -416,7 +416,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::any)
JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::race)
{
// 1. Let C be the this value.
- auto* constructor = TRY(vm.this_value().to_object(vm));
+ auto constructor = TRY(vm.this_value().to_object(vm));
// 2. Let promiseCapability be ? NewPromiseCapability(C).
auto promise_capability = TRY(new_promise_capability(vm, constructor));
@@ -452,7 +452,7 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::reject)
auto reason = vm.argument(0);
// 1. Let C be the this value.
- auto* constructor = TRY(vm.this_value().to_object(vm));
+ auto constructor = TRY(vm.this_value().to_object(vm));
// 2. Let promiseCapability be ? NewPromiseCapability(C).
auto promise_capability = TRY(new_promise_capability(vm, constructor));