Closed Bug 866474 Opened 11 years ago Closed 7 years ago

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

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mozillabugs, Unassigned)

References

Details

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: 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
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.