mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
LibJS: Convert Intl::NumberFormatFunction::create() to NonnullGCPtr
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 05:58:46 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/658bd2f342 Pull-request: https://github.com/SerenityOS/serenity/pull/16479 Reviewed-by: https://github.com/davidot ✅
@@ -12,9 +12,9 @@ namespace JS::Intl {
|
||||
|
||||
// 15.5.2 Number Format Functions, https://tc39.es/ecma402/#sec-number-format-functions
|
||||
// 1.1.4 Number Format Functions, https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/proposed.html#sec-number-format-functions
|
||||
NumberFormatFunction* NumberFormatFunction::create(Realm& realm, NumberFormat& number_format)
|
||||
NonnullGCPtr<NumberFormatFunction> NumberFormatFunction::create(Realm& realm, NumberFormat& number_format)
|
||||
{
|
||||
return realm.heap().allocate<NumberFormatFunction>(realm, number_format, *realm.intrinsics().function_prototype());
|
||||
return *realm.heap().allocate<NumberFormatFunction>(realm, number_format, *realm.intrinsics().function_prototype());
|
||||
}
|
||||
|
||||
NumberFormatFunction::NumberFormatFunction(NumberFormat& number_format, Object& prototype)
|
||||
|
||||
Reference in New Issue
Block a user