Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 325456987d1d6270880f79c825d23f0a7dc631b9
      
https://github.com/WebKit/WebKit/commit/325456987d1d6270880f79c825d23f0a7dc631b9
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-04-18 (Sat, 18 Apr 2026)

  Changed paths:
    M JSTests/test262/config.yaml
    M Source/JavaScriptCore/runtime/IntlLocale.cpp

  Log Message:
  -----------
  [JSC] Intl.Locale needs to canonicalize before override language
https://bugs.webkit.org/show_bug.cgi?id=312693
rdar://175092327

Reviewed by Sosuke Suzuki.

In https://tc39.es/ecma402/#sec-Intl.Locale, step 13
CanonicalizeUnicodeLocaleId needs to be called before UpdateLanguageId.
So we add canonicalization before UpdateLanguageId phase.

For new Intl.Locale("und-Armn-SU", {language: "ru"}):

- Before: und-Armn-SU -> override language -> ru-Armn-SU -> canonicalize -> 
ru-Armn-RU (wrong)
- After: und-Armn-SU -> canonicalize -> und-Armn-AM -> override language -> 
ru-Armn-AM -> canonicalize -> ru-Armn-AM

* JSTests/test262/config.yaml:
* Source/JavaScriptCore/runtime/IntlLocale.cpp:
(JSC::LocaleIDBuilder::canonicalize):
(JSC::IntlLocale::initializeLocale):

Canonical link: https://commits.webkit.org/311538@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to