diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp index e2a2b875f8..3d5358d1ae 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.cpp @@ -116,7 +116,7 @@ ThrowCompletionOr<Value> canonical_code_for_display_names(VM& vm, DisplayNames:: // c. Return ! CanonicalizeUnicodeLocaleId(code). auto canonicalized_tag = JS::Intl::canonicalize_unicode_locale_id(*locale_id); - return js_string(vm, move(canonicalized_tag)); + return PrimitiveString::create(vm, move(canonicalized_tag)); } // 2. If type is "region", then @@ -126,7 +126,7 @@ ThrowCompletionOr<Value> canonical_code_for_display_names(VM& vm, DisplayNames:: return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, code, "region"sv); // b. Return the ASCII-uppercase of code. - return js_string(vm, code.to_uppercase_string()); + return PrimitiveString::create(vm, code.to_uppercase_string()); } // 3. If type is "script", then @@ -142,7 +142,7 @@ ThrowCompletionOr<Value> canonical_code_for_display_names(VM& vm, DisplayNames:: // c. Let first be the ASCII-uppercase of the substring of code from 0 to 1. // d. Let rest be the ASCII-lowercase of the substring of code from 1. // e. Return the string-concatenation of first and rest. - return js_string(vm, code.to_titlecase_string()); + return PrimitiveString::create(vm, code.to_titlecase_string()); } // 4. If type is "calendar", then @@ -156,7 +156,7 @@ ThrowCompletionOr<Value> canonical_code_for_display_names(VM& vm, DisplayNames:: return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, code, "calendar"sv); // c. Return the ASCII-lowercase of code. - return js_string(vm, code.to_lowercase_string()); + return PrimitiveString::create(vm, code.to_lowercase_string()); } // 5. If type is "dateTimeField", then @@ -166,7 +166,7 @@ ThrowCompletionOr<Value> canonical_code_for_display_names(VM& vm, DisplayNames:: return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, code, "dateTimeField"sv); // b. Return code. - return js_string(vm, code); + return PrimitiveString::create(vm, code); } // 6. Assert: type is "currency". @@ -177,7 +177,7 @@ ThrowCompletionOr<Value> canonical_code_for_display_names(VM& vm, DisplayNames:: return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, code, "currency"sv); // 8. Return the ASCII-uppercase of code. - return js_string(vm, code.to_uppercase_string()); + return PrimitiveString::create(vm, code.to_uppercase_string()); } // 12.5.2 IsValidDateTimeFieldCode ( field ), https://tc39.es/ecma402/#sec-isvaliddatetimefieldcode |