| Index: src/js/i18n.js
|
| diff --git a/src/js/i18n.js b/src/js/i18n.js
|
| index 680f67ad3a082dd7b2e9d18b53f119ad289f4264..a4761f70696a5bf8978936e7ce4a948af89ad95c 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 C++ 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;
|
| });
|
|
|
| })
|
|
|