Make JSRuntime::setDefaultLocale check whether internationalization API can use the locale

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
7 months ago

People

(Reporter: Norbert Lindenberg, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
The JSRuntime::setDefaultLocale function currently accepts any string as a locale; it doesn't check whether it's a valid BCP 47 language tag and supported by the implementation of the Internationalization API. It's up to the DefaultLocale function in Intl.js whether it actually uses the runtime's default locale.

It might be better to have JSRuntime::setDefaultLocale check whether the string is acceptable, and reject it if not.
(Assignee)

Updated

4 years ago
Assignee: general → nobody
The only caller of this method is now using LocaleService which canonicalizes the locale code.

I think we can close this as fixed.
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.