mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-29 02:57:17 +02:00
LibJS: Convert standalone construct() to NonnullGCPtr
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 20:19:08 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/bd40464195 Pull-request: https://github.com/SerenityOS/serenity/pull/16498 Reviewed-by: https://github.com/trflynn89 ✅
@@ -548,8 +548,8 @@ ThrowCompletionOr<Vector<PatternPartition>> format_date_time_pattern(VM& vm, Dat
|
||||
auto const& data_locale = date_time_format.data_locale();
|
||||
|
||||
auto construct_number_format = [&](auto& options) -> ThrowCompletionOr<NumberFormat*> {
|
||||
auto* number_format = TRY(construct(vm, *realm.intrinsics().intl_number_format_constructor(), PrimitiveString::create(vm, locale), options));
|
||||
return static_cast<NumberFormat*>(number_format);
|
||||
auto number_format = TRY(construct(vm, *realm.intrinsics().intl_number_format_constructor(), PrimitiveString::create(vm, locale), options));
|
||||
return static_cast<NumberFormat*>(number_format.ptr());
|
||||
};
|
||||
|
||||
// 4. Let nfOptions be OrdinaryObjectCreate(null).
|
||||
|
||||
Reference in New Issue
Block a user