From 1c24b82dd769c40243707c8c8ee5febaae2b2a58 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Wed, 14 Dec 2022 18:34:32 +0000 Subject: LibJS: Convert ordinary_create_from_constructor() to NonnullGCPtr --- Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp') diff --git a/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp b/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp index 2ba922ba4b..431288c3e4 100644 --- a/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/AggregateErrorConstructor.cpp @@ -48,7 +48,7 @@ ThrowCompletionOr AggregateErrorConstructor::construct(FunctionObject& auto options = vm.argument(2); // 2. Let O be ? OrdinaryCreateFromConstructor(newTarget, "%AggregateError.prototype%", « [[ErrorData]] »). - auto* aggregate_error = TRY(ordinary_create_from_constructor(vm, new_target, &Intrinsics::aggregate_error_prototype)); + auto aggregate_error = TRY(ordinary_create_from_constructor(vm, new_target, &Intrinsics::aggregate_error_prototype)); // 3. If message is not undefined, then if (!message.is_undefined()) { @@ -69,7 +69,7 @@ ThrowCompletionOr AggregateErrorConstructor::construct(FunctionObject& MUST(aggregate_error->define_property_or_throw(vm.names.errors, { .value = Array::create_from(realm, errors_list), .writable = true, .enumerable = false, .configurable = true })); // 7. Return O. - return aggregate_error; + return aggregate_error.ptr(); } } -- cgit v1.2.3