Bug 912701 - Expand some Intl self-hosting assertion messages to aid in debugging-by-eye. r=trivial

--HG--
extra : rebase_source : 736ee90d527ea2b44cc3929e0ba7a40947842a0b
This commit is contained in:
Jeff Walden 2013-09-16 14:26:56 -07:00
parent 9ef88ee9ca
commit cc7b514bd3

View File

@ -525,9 +525,9 @@ function CanonicalizeLocaleList(locales) {
* Spec: RFC 4647, section 3.4.
*/
function BestAvailableLocale(availableLocales, locale) {
assert(IsStructurallyValidLanguageTag(locale), "BestAvailableLocale");
assert(locale === CanonicalizeLanguageTag(locale), "BestAvailableLocale");
assert(callFunction(std_String_indexOf, locale, "-u-") === -1, "BestAvailableLocale");
assert(IsStructurallyValidLanguageTag(locale), "invalid BestAvailableLocale locale structure");
assert(locale === CanonicalizeLanguageTag(locale), "non-canonical BestAvailableLocale locale");
assert(callFunction(std_String_indexOf, locale, "-u-") === -1, "locale shouldn't contain -u-");
var candidate = locale;
while (true) {