1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:37:44 +00:00

LibJS: Convert Intl::Locale::create() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-13 20:49:50 +00:00
parent 81d5bbcb04
commit b2034c59dc
2 changed files with 3 additions and 3 deletions

View file

@ -14,9 +14,9 @@
namespace JS::Intl { 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 // 14 Locale Objects, https://tc39.es/ecma402/#locale-objects

View file

@ -21,7 +21,7 @@ class Locale final : public Object {
JS_OBJECT(Locale, Object); JS_OBJECT(Locale, Object);
public: public:
static Locale* create(Realm&, ::Locale::LocaleID const&); static NonnullGCPtr<Locale> create(Realm&, ::Locale::LocaleID const&);
static constexpr auto relevant_extension_keys() static constexpr auto relevant_extension_keys()
{ {