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

Unified Diff: src/i18n.js

Issue 1309503003: Install js intrinsic fallbacks for array functions on the native context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@context_intrinsics
Patch Set: Created 5 years, 4 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/contexts.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/i18n.js
diff --git a/src/i18n.js b/src/i18n.js
index 5fd32c8b407fd7335051f4f76fdc486d9ffd9e60..f0bcbc3c4f9959772c2dfd131804e4502ab503e5 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -19,6 +19,7 @@
var ArrayIndexOf;
var ArrayJoin;
+var ArrayPush;
var IsFinite;
var IsNaN;
var GlobalBoolean = global.Boolean;
@@ -39,6 +40,7 @@ var StringSubstring;
utils.Import(function(from) {
ArrayIndexOf = from.ArrayIndexOf;
ArrayJoin = from.ArrayJoin;
+ ArrayPush = from.ArrayPush;
IsFinite = from.IsFinite;
IsNaN = from.IsNaN;
MathFloor = from.MathFloor;
@@ -298,7 +300,7 @@ function lookupSupportedLocalesOf(requestedLocales, availableLocales) {
do {
if (!IS_UNDEFINED(availableLocales[locale])) {
// Push requested locale not the resolved one.
- %_CallFunction(matchedLocales, requestedLocales[i], $arrayPush);
+ %_CallFunction(matchedLocales, requestedLocales[i], ArrayPush);
break;
}
// Truncate locale if possible, if not break.
@@ -715,7 +717,7 @@ function initializeLocaleList(locales) {
} else {
// We allow single string localeID.
if (typeof locales === 'string') {
- %_CallFunction(seen, canonicalizeLanguageTag(locales), $arrayPush);
+ %_CallFunction(seen, canonicalizeLanguageTag(locales), ArrayPush);
return freezeArray(seen);
}
@@ -729,7 +731,7 @@ function initializeLocaleList(locales) {
var tag = canonicalizeLanguageTag(value);
if (%_CallFunction(seen, tag, ArrayIndexOf) === -1) {
- %_CallFunction(seen, tag, $arrayPush);
+ %_CallFunction(seen, tag, ArrayPush);
}
}
}
@@ -775,7 +777,7 @@ function isValidLanguageTag(locale) {
if (%_CallFunction(GetLanguageVariantRE(), value, RegExpTest) &&
extensions.length === 0) {
if (%_CallFunction(variants, value, ArrayIndexOf) === -1) {
- %_CallFunction(variants, value, $arrayPush);
+ %_CallFunction(variants, value, ArrayPush);
} else {
return false;
}
@@ -783,7 +785,7 @@ function isValidLanguageTag(locale) {
if (%_CallFunction(GetLanguageSingletonRE(), value, RegExpTest)) {
if (%_CallFunction(extensions, value, ArrayIndexOf) === -1) {
- %_CallFunction(extensions, value, $arrayPush);
+ %_CallFunction(extensions, value, ArrayPush);
} else {
return false;
}
« no previous file with comments | « src/contexts.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698