From 91b0123eaf16afd8a36c3603535860385e75bd81 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 13 Dec 2022 20:49:49 +0000 Subject: LibJS: Convert Array::create{,_from}() to NonnullGCPtr --- .../Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp') diff --git a/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp b/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp index c277ab9d19..a03622d70b 100644 --- a/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp +++ b/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp @@ -75,7 +75,7 @@ ThrowCompletionOr PromiseAllResolveElementFunction::resolve_element() // 10. If remainingElementsCount.[[Value]] is 0, then if (--m_remaining_elements.value == 0) { // a. Let valuesArray be CreateArrayFromList(values). - auto* values_array = Array::create_from(realm, m_values.values()); + auto values_array = Array::create_from(realm, m_values.values()); // b. Return ? Call(promiseCapability.[[Resolve]], undefined, « valuesArray »). return JS::call(vm, *m_capability->resolve(), js_undefined(), values_array); @@ -116,7 +116,7 @@ ThrowCompletionOr PromiseAllSettledResolveElementFunction::resolve_elemen // 14. If remainingElementsCount.[[Value]] is 0, then if (--m_remaining_elements.value == 0) { // a. Let valuesArray be CreateArrayFromList(values). - auto* values_array = Array::create_from(realm, m_values.values()); + auto values_array = Array::create_from(realm, m_values.values()); // b. Return ? Call(promiseCapability.[[Resolve]], undefined, « valuesArray »). return JS::call(vm, *m_capability->resolve(), js_undefined(), values_array); @@ -157,7 +157,7 @@ ThrowCompletionOr PromiseAllSettledRejectElementFunction::resolve_element // 14. If remainingElementsCount.[[Value]] is 0, then if (--m_remaining_elements.value == 0) { // a. Let valuesArray be CreateArrayFromList(values). - auto* values_array = Array::create_from(realm, m_values.values()); + auto values_array = Array::create_from(realm, m_values.values()); // b. Return ? Call(promiseCapability.[[Resolve]], undefined, « valuesArray »). return JS::call(vm, *m_capability->resolve(), js_undefined(), values_array); @@ -192,7 +192,7 @@ ThrowCompletionOr PromiseAnyRejectElementFunction::resolve_element() auto error = AggregateError::create(realm); // b. Perform ! DefinePropertyOrThrow(error, "errors", PropertyDescriptor { [[Configurable]]: true, [[Enumerable]]: false, [[Writable]]: true, [[Value]]: CreateArrayFromList(errors) }). - auto* errors_array = Array::create_from(realm, m_values.values()); + auto errors_array = Array::create_from(realm, m_values.values()); MUST(error->define_property_or_throw(vm.names.errors, { .value = errors_array, .writable = true, .enumerable = false, .configurable = true })); // c. Return ? Call(promiseCapability.[[Reject]], undefined, « error »). -- cgit v1.2.3