Closed Bug 1736017 Opened 1 year ago Closed 1 year ago

Unify intl/locale/MozLocale and intl/components/Locale

Categories

(Core :: Internationalization, task, P3)

task

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: dminor, Assigned: dminor)

References

Details

(Whiteboard: [i18n-unification])

Attachments

(9 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Bug 1719746 moved the LanguageTag implementation from SpiderMonkey to mozilla::intl::Locale. Unfortunately, we also have a mozilla:intl::Locale class in intl/Locale/MozLocale.h. This lead to crashes due to the wrong destructor being called!

To workaround this, I renamed the MozLocale version to mozilla::intl::Locale in Bug 1719746. This bug tracks unifying the two implementations.

Assignee: nobody → dminor

Depends on D129212

Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/11721cc861b0
Replace MozLocale with Locale in nsLineBreaker.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/19be73147fcc
Replace MozLocale with Locale in PaymentRequest.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/c0cef271022d
Replace MozLocale with Locale in EditorSpellCheck.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/f771265e0930
Replace MozLocale with Locale in gfxPlatformFontList.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/84ba2cbd596a
Replace MozLocale with Locale in LocaleService.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/a78125c71b3e
Replace MozLocale with Locale in Quotes.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/f16572806b0c
Replace MozLocale with Locale in nsLanguageAtomService.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/7249dec70600
Replace MozLocale with Locale in OSPreferences_win.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/d7b7427bb29e
Remove MozLocale; r=platform-i18n-reviewers,gregtatum

Oops, I forgot to try building after I rebased.

Flags: needinfo?(dminor)
Depends on: 1738340

I think we need to figure out how we want to handle _ in the LocaleParser in Bug 1738340 before we can land the patches here.

After some local testing and try runs [1] [2] with an assertion added, I don't think we need to solve Bug 1738340 before landing this. The only location in tree where I'm certain we're using _ as a separator is not affected by the patch stack here.

[1] https://treeherder.mozilla.org/jobs?repo=try&revision=76e4d3a021133837594671f112b85be1bea70868
[2] https://treeherder.mozilla.org/jobs?repo=try&revision=1e13e700e4e7604a0b6eff6ab43ff22390b6335c

No longer depends on: 1738340
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8cafb816ae31
Replace MozLocale with Locale in nsLineBreaker.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/98e29bc1f4fb
Replace MozLocale with Locale in PaymentRequest.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/31dcf5dbf0b2
Replace MozLocale with Locale in EditorSpellCheck.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/e16018b57faf
Replace MozLocale with Locale in gfxPlatformFontList.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/6f6bc4549520
Replace MozLocale with Locale in LocaleService.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/1055cd0ae3a0
Replace MozLocale with Locale in Quotes.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/99bdf30baacd
Replace MozLocale with Locale in nsLanguageAtomService.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/fdf26f350832
Replace MozLocale with Locale in OSPreferences_win.cpp; r=platform-i18n-reviewers,gregtatum
https://hg.mozilla.org/integration/autoland/rev/5d984460e274
Remove MozLocale; r=platform-i18n-reviewers,gregtatum
You need to log in before you can comment on or make changes to this bug.