mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
LibJS: Convert Intl::Locale::create() to NonnullGCPtr
This commit is contained in:
parent
81d5bbcb04
commit
b2034c59dc
|
@ -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
|
||||
|
|
|
@ -21,7 +21,7 @@ class Locale final : public Object {
|
|||
JS_OBJECT(Locale, Object);
|
||||
|
||||
public:
|
||||
static Locale* create(Realm&, ::Locale::LocaleID const&);
|
||||
static NonnullGCPtr<Locale> create(Realm&, ::Locale::LocaleID const&);
|
||||
|
||||
static constexpr auto relevant_extension_keys()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue