summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Intl/Locale.h
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-08-20 08:25:24 +0100
committerLinus Groh <mail@linusgroh.de>2022-08-23 13:58:30 +0100
commitf9705eb2f489416a32d145f5363ab0783949add3 (patch)
treef83770b5209855f6aea045bf29e1b5ab657d5a21 /Userland/Libraries/LibJS/Runtime/Intl/Locale.h
parent999da617c5a59f2c8bc8b199c69014ee04668ee1 (diff)
downloadserenity-f9705eb2f489416a32d145f5363ab0783949add3.zip
LibJS: Replace GlobalObject with VM in Intl AOs [Part 1/19]
Instead of passing a GlobalObject everywhere, we will simply pass a VM, from which we can get everything we need: common names, the current realm, symbols, arguments, the heap, and a few other things. In some places we already don't actually need a global object and just do it for consistency - no more `auto& vm = global_object.vm();`! This will eventually automatically fix the "wrong realm" issue we have in some places where we (incorrectly) use the global object from the allocating object, e.g. in call() / construct() implementations. When only ever a VM is passed around, this issue can't happen :^) I've decided to split this change into a series of patches that should keep each commit down do a somewhat manageable size.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl/Locale.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/Locale.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Locale.h b/Userland/Libraries/LibJS/Runtime/Intl/Locale.h
index 32d230e439..2afdedfda7 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/Locale.h
+++ b/Userland/Libraries/LibJS/Runtime/Intl/Locale.h
@@ -81,12 +81,12 @@ struct WeekInfo {
Vector<u8> weekend; // [[Weekend]]
};
-Array* calendars_of_locale(GlobalObject& global_object, Locale const& locale);
-Array* collations_of_locale(GlobalObject& global_object, Locale const& locale);
-Array* hour_cycles_of_locale(GlobalObject& global_object, Locale const& locale);
-Array* numbering_systems_of_locale(GlobalObject& global_object, Locale const& locale);
-Array* time_zones_of_locale(GlobalObject& global_object, StringView region);
-StringView character_direction_of_locale(Locale const& locale);
-WeekInfo week_info_of_locale(Locale const& locale);
+Array* calendars_of_locale(VM&, Locale const&);
+Array* collations_of_locale(VM&, Locale const& locale);
+Array* hour_cycles_of_locale(VM&, Locale const& locale);
+Array* numbering_systems_of_locale(VM&, Locale const&);
+Array* time_zones_of_locale(VM&, StringView region);
+StringView character_direction_of_locale(Locale const&);
+WeekInfo week_info_of_locale(Locale const&);
}