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

Unified Diff: src/js/i18n.js

Issue 2339123002: [builtins] Move StringLastIndexOf to a builtin. (Closed)
Patch Set: Variable renaming to make things a bit clearer Created 4 years, 3 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/builtins/builtins-string.cc ('k') | src/js/string.js » ('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 7ccefef928e6990f44396a849d0137938728eda8..2e865906f2031c40dc4926eb3d6bced548a808cc 100644
--- a/src/js/i18n.js
+++ b/src/js/i18n.js
@@ -35,7 +35,6 @@ var patternSymbol = utils.ImportNow("intl_pattern_symbol");
var resolvedSymbol = utils.ImportNow("intl_resolved_symbol");
var SetFunctionName = utils.SetFunctionName;
var StringIndexOf;
-var StringLastIndexOf;
var StringSubstr;
var StringSubstring;
@@ -45,7 +44,6 @@ utils.Import(function(from) {
InternalRegExpMatch = from.InternalRegExpMatch;
InternalRegExpReplace = from.InternalRegExpReplace;
StringIndexOf = from.StringIndexOf;
- StringLastIndexOf = from.StringLastIndexOf;
StringSubstr = from.StringSubstr;
StringSubstring = from.StringSubstring;
});
@@ -316,7 +314,7 @@ function lookupSupportedLocalesOf(requestedLocales, availableLocales) {
break;
}
// Truncate locale if possible, if not break.
- var pos = %_Call(StringLastIndexOf, locale, '-');
+ var pos = %StringLastIndexOf(locale, '-');
if (pos === -1) {
break;
}
@@ -439,7 +437,7 @@ function lookupMatcher(service, requestedLocales) {
return {'locale': locale, 'extension': extension, 'position': i};
}
// Truncate locale if possible.
- var pos = %_Call(StringLastIndexOf, locale, '-');
+ var pos = %StringLastIndexOf(locale, '-');
if (pos === -1) {
break;
}
« no previous file with comments | « src/builtins/builtins-string.cc ('k') | src/js/string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698