mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 21:12:26 +00:00
LibJS: Convert Intl::Locale::create() to NonnullGCPtr
This commit is contained in:
parent
81d5bbcb04
commit
b2034c59dc
Notes:
sideshowbarker
2024-07-17 07:31:31 +09:00
Author: https://github.com/linusg
Commit: b2034c59dc
Pull-request: https://github.com/SerenityOS/serenity/pull/16479
Reviewed-by: https://github.com/davidot ✅
2 changed files with 3 additions and 3 deletions
|
@ -14,9 +14,9 @@
|
|||
|
||||
namespace JS::Intl {
|
||||
|
||||
Locale* Locale::create(Realm& realm, ::Locale::LocaleID const& locale_id)
|
||||
NonnullGCPtr<Locale> Locale::create(Realm& realm, ::Locale::LocaleID const& locale_id)
|
||||
{
|
||||
return realm.heap().allocate<Locale>(realm, locale_id, *realm.intrinsics().intl_locale_prototype());
|
||||
return *realm.heap().allocate<Locale>(realm, locale_id, *realm.intrinsics().intl_locale_prototype());
|
||||
}
|
||||
|
||||
// 14 Locale Objects, https://tc39.es/ecma402/#locale-objects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue