Bug 1625975 - Part 1: Enable numberingSystem and calendar options by default. r=jwalden
authorAndré Bargull <andre.bargull@gmail.com>
Mon, 30 Mar 2020 20:59:58 +0000
changeset 521253 e61365b0ffc236fb49e5913277b2e1bbf6ecab10
parent 521252 bf8910303fdf10f3dec528b929a3c313ff6ade92
child 521254 c1cef0d5f47f9f557d17f4e3051f21ee1288ea8f
push id37269
push useraiakab@mozilla.com
push dateTue, 31 Mar 2020 22:58:23 +0000
treeherdermozilla-central@9af589864188 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1625975
milestone76.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1625975 - Part 1: Enable numberingSystem and calendar options by default. r=jwalden Differential Revision: https://phabricator.services.mozilla.com/D68812
js/src/builtin/intl/DateTimeFormat.js
js/src/builtin/intl/NumberFormat.js
js/src/builtin/intl/RelativeTimeFormat.js
--- a/js/src/builtin/intl/DateTimeFormat.js
+++ b/js/src/builtin/intl/DateTimeFormat.js
@@ -349,18 +349,16 @@ function InitializeDateTimeFormat(dateTi
     lazyDateTimeFormatData.localeOpt = localeOpt;
 
     // Steps 4-5.
     var localeMatcher =
         GetOption(options, "localeMatcher", "string", ["lookup", "best fit"],
                   "best fit");
     localeOpt.localeMatcher = localeMatcher;
 
-    // https://github.com/tc39/ecma402/pull/175
-#ifdef NIGHTLY_BUILD
     var calendar = GetOption(options, "calendar", "string", undefined, undefined);
 
     if (calendar !== undefined) {
         calendar = intl_ValidateAndCanonicalizeUnicodeExtensionType(calendar, "calendar", "ca");
     }
 
     localeOpt.ca = calendar;
 
@@ -368,17 +366,16 @@ function InitializeDateTimeFormat(dateTi
 
     if (numberingSystem !== undefined) {
         numberingSystem = intl_ValidateAndCanonicalizeUnicodeExtensionType(numberingSystem,
                                                                            "numberingSystem",
                                                                            "nu");
     }
 
     localeOpt.nu = numberingSystem;
-#endif
 
     // Step 6.
     var hr12  = GetOption(options, "hour12", "boolean", undefined, undefined);
 
     // Step 7.
     var hc = GetOption(options, "hourCycle", "string", ["h11", "h12", "h23", "h24"], undefined);
 
     // Step 8.
--- a/js/src/builtin/intl/NumberFormat.js
+++ b/js/src/builtin/intl/NumberFormat.js
@@ -453,28 +453,25 @@ function InitializeNumberFormat(numberFo
     // Step 4.
     var opt = new Record();
     lazyNumberFormatData.opt = opt;
 
     // Steps 5-6.
     var matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
     opt.localeMatcher = matcher;
 
-// https://github.com/tc39/ecma402/pull/175
-#ifdef NIGHTLY_BUILD
     var numberingSystem = GetOption(options, "numberingSystem", "string", undefined, undefined);
 
     if (numberingSystem !== undefined) {
         numberingSystem = intl_ValidateAndCanonicalizeUnicodeExtensionType(numberingSystem,
                                                                            "numberingSystem",
                                                                            "nu");
     }
 
     opt.nu = numberingSystem;
-#endif
 
     // Compute formatting options.
     // Step 12.
     var style = GetOption(options, "style", "string",
 #ifdef NIGHTLY_BUILD
                           ["decimal", "percent", "currency", "unit"],
 #else
                           ["decimal", "percent", "currency"],
--- a/js/src/builtin/intl/RelativeTimeFormat.js
+++ b/js/src/builtin/intl/RelativeTimeFormat.js
@@ -123,27 +123,24 @@ function InitializeRelativeTimeFormat(re
 
     // Step 4.
     let opt = new Record();
 
     // Steps 5-6.
     let matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
     opt.localeMatcher = matcher;
 
-    // RelativeTimeFormat equivalent to https://github.com/tc39/ecma402/pull/175
-#ifdef NIGHTLY_BUILD
     // Steps 7-9.
     let numberingSystem = GetOption(options, "numberingSystem", "string", undefined, undefined);
     if (numberingSystem !== undefined) {
         numberingSystem = intl_ValidateAndCanonicalizeUnicodeExtensionType(numberingSystem,
                                                                            "numberingSystem",
                                                                            "nu");
     }
     opt.nu = numberingSystem;
-#endif
 
     lazyRelativeTimeFormatData.opt = opt;
 
     // Steps 16-17.
     const style = GetOption(options, "style", "string", ["long", "short", "narrow"], "long");
     lazyRelativeTimeFormatData.style = style;
 
     // Steps 18-19.