| Index: src/js/i18n.js
|
| diff --git a/src/js/i18n.js b/src/js/i18n.js
|
| index 26ebe7e8431a02345348122d8f0c549666f48acc..d58f06a0cc2a6eda60e4894b5b6458c096655e68 100644
|
| --- a/src/js/i18n.js
|
| +++ b/src/js/i18n.js
|
| @@ -2053,6 +2053,7 @@ OverrideFunction(GlobalString.prototype, 'normalize', function() {
|
| }
|
| );
|
|
|
| +// TODO(littledan): Rewrite these two functions as direct builtins
|
| function ToLowerCaseI18N() {
|
| CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLowerCase");
|
| return %StringToLowerCaseI18N(TO_STRING(this));
|
| @@ -2077,18 +2078,6 @@ function ToLocaleUpperCaseI18N(locales) {
|
|
|
| %FunctionSetLength(ToLocaleUpperCaseI18N, 0);
|
|
|
| -%FunctionRemovePrototype(ToLowerCaseI18N);
|
| -%FunctionRemovePrototype(ToUpperCaseI18N);
|
| -%FunctionRemovePrototype(ToLocaleLowerCaseI18N);
|
| -%FunctionRemovePrototype(ToLocaleUpperCaseI18N);
|
| -
|
| -utils.Export(function(to) {
|
| - to.ToLowerCaseI18N = ToLowerCaseI18N;
|
| - to.ToUpperCaseI18N = ToUpperCaseI18N;
|
| - to.ToLocaleLowerCaseI18N = ToLocaleLowerCaseI18N;
|
| - to.ToLocaleUpperCaseI18N = ToLocaleUpperCaseI18N;
|
| -});
|
| -
|
|
|
| /**
|
| * Formats a Number object (this) using locale and options values.
|
| @@ -2169,9 +2158,23 @@ OverrideFunction(GlobalDate.prototype, 'toLocaleTimeString', function() {
|
| );
|
|
|
| %FunctionRemovePrototype(FormatDateToParts);
|
| +%FunctionRemovePrototype(ToLowerCaseI18N);
|
| +%FunctionRemovePrototype(ToUpperCaseI18N);
|
| +%FunctionRemovePrototype(ToLocaleLowerCaseI18N);
|
| +%FunctionRemovePrototype(ToLocaleUpperCaseI18N);
|
| +
|
| +utils.SetFunctionName(FormatDateToParts, "formatToParts");
|
| +utils.SetFunctionName(ToLowerCaseI18N, "toLowerCase");
|
| +utils.SetFunctionName(ToUpperCaseI18N, "toUpperCase");
|
| +utils.SetFunctionName(ToLocaleLowerCaseI18N, "toLocaleLowerCase");
|
| +utils.SetFunctionName(ToLocaleUpperCaseI18N, "toLocaleUpperCase");
|
|
|
| utils.Export(function(to) {
|
| to.FormatDateToParts = FormatDateToParts;
|
| + to.ToLowerCaseI18N = ToLowerCaseI18N;
|
| + to.ToUpperCaseI18N = ToUpperCaseI18N;
|
| + to.ToLocaleLowerCaseI18N = ToLocaleLowerCaseI18N;
|
| + to.ToLocaleUpperCaseI18N = ToLocaleUpperCaseI18N;
|
| });
|
|
|
| })
|
|
|