Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Unified Diff: src/js/i18n.js

Issue 2588963002: Turn on icu_case_mapping by default (Closed)
Patch Set: tighten up comparison ops Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | test/webkit/fast/js/string-capitalization-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/i18n.js
diff --git a/src/js/i18n.js b/src/js/i18n.js
index 18d13db9a2c2f96e88f2c96305486ec7cb933cc9..cab68a0f6db2f08525d83bcbd224f973eea036af 100644
--- a/src/js/i18n.js
+++ b/src/js/i18n.js
@@ -1124,7 +1124,7 @@ AddBoundMethod(GlobalIntlCollator, 'compare', compare, 2, 'collator', false);
* For example \u00DFP (Eszett+P) becomes SSP.
*/
function isWellFormedCurrencyCode(currency) {
- return typeof currency == "string" && currency.length == 3 &&
+ return typeof currency === "string" && currency.length === 3 &&
IS_NULL(%regexp_internal_match(/[^A-Za-z]/, currency));
}
@@ -2024,13 +2024,13 @@ function LocaleConvertCase(s, locales, isToUpper) {
// StringSplit is slower than this.
var pos = %StringIndexOf(language, '-', 0);
- if (pos != -1) {
+ if (pos !== -1) {
language = %_Call(StringSubstring, language, 0, pos);
}
var CUSTOM_CASE_LANGUAGES = ['az', 'el', 'lt', 'tr'];
var langIndex = %ArrayIndexOf(CUSTOM_CASE_LANGUAGES, language, 0);
- if (langIndex == -1) {
+ if (langIndex === -1) {
jungshik at Google 2017/01/10 01:22:45 I tightened the comparison here just in case altho
// language-independent case conversion.
return isToUpper ? %StringToUpperCaseI18N(s) : %StringToLowerCaseI18N(s);
}
« no previous file with comments | « src/flag-definitions.h ('k') | test/webkit/fast/js/string-capitalization-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698