diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-13 20:49:49 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-14 09:59:45 +0000 |
commit | 91b0123eaf16afd8a36c3603535860385e75bd81 (patch) | |
tree | 9b54cd78d322346f9786900ddb9ceefb0b0fd815 /Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp | |
parent | 0c50751c134385d690e436249b79e3ddf74ee369 (diff) | |
download | serenity-91b0123eaf16afd8a36c3603535860385e75bd81.zip |
LibJS: Convert Array::create{,_from}() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<Value> 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<Value> 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<Value> 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<Value> 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 »). |