diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-03-15 10:33:30 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-15 17:30:58 +0100 |
commit | 194ca06f784448f77b64181d3a654ca099279e19 (patch) | |
tree | df568877dfd9b478cb22901d1bff6e943cbf1119 /Userland | |
parent | 421eef0f868afc2f68adc05135aafc13ba473bc3 (diff) | |
download | serenity-194ca06f784448f77b64181d3a654ca099279e19.zip |
LibJS: Reorganize spec steps for Intl.Collator
This is an editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/7c13db4
This also normalizes the spelling of the "Internal slots" heading in
Intl.Collator, which is another editorial change in the Intl spec:
https://github.com/tc39/ecma402/commit/ec064bd
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Intl/Collator.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Collator.h b/Userland/Libraries/LibJS/Runtime/Intl/Collator.h index cf72a86a8e..40f61f45d1 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Collator.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/Collator.h @@ -38,7 +38,7 @@ public: static constexpr auto relevant_extension_keys() { - // 10.2.3 Internal Slots, https://tc39.es/ecma402/#sec-intl-collator-internal-slots + // 10.2.3 Internal slots, https://tc39.es/ecma402/#sec-intl-collator-internal-slots // The value of the [[RelevantExtensionKeys]] internal slot is a List that must include the element "co", may include any or all of the elements "kf" and "kn", and must not include any other elements. return AK::Array { "co"sv, "kf"sv, "kn"sv }; } diff --git a/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp index 1373456b94..2e04af6ebd 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp @@ -14,7 +14,7 @@ namespace JS::Intl { -// 10.1.1 InitializeCollator ( collator, locales, options ), https://tc39.es/ecma402/#sec-initializecollator +// 10.1.2 InitializeCollator ( collator, locales, options ), https://tc39.es/ecma402/#sec-initializecollator static ThrowCompletionOr<Collator*> initialize_collator(GlobalObject& global_object, Collator& collator, Value locales_value, Value options_value) { auto& vm = global_object.vm(); @@ -151,14 +151,14 @@ void CollatorConstructor::initialize(GlobalObject& global_object) define_native_function(vm.names.supportedLocalesOf, supported_locales_of, 1, attr); } -// 10.1.2 Intl.Collator ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sec-intl.collator +// 10.1.1 Intl.Collator ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sec-intl.collator ThrowCompletionOr<Value> CollatorConstructor::call() { // 1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget be NewTarget return TRY(construct(*this)); } -// 10.1.2 Intl.Collator ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sec-intl.collator +// 10.1.1 Intl.Collator ( [ locales [ , options ] ] ), https://tc39.es/ecma402/#sec-intl.collator ThrowCompletionOr<Object*> CollatorConstructor::construct(FunctionObject& new_target) { auto& vm = this->vm(); |