Bug 1527902 - Enable javascript.options.bigint by default r=jandem,kmag
authorRobin Templeton <robin@igalia.com>
Thu, 02 May 2019 19:19:00 +0000
changeset 531160 a21eae6d674f1c5961414e2f260b3fb35bbe2995
parent 531159 37d758a90ed9fc26c1d09993ddf73823295ea5d0
child 531161 b05a12b3fd2a53009c02fd23a7bb6c3c7fba6302
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem, kmag
bugs1527902
milestone68.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 1527902 - Enable javascript.options.bigint by default r=jandem,kmag Differential Revision: https://phabricator.services.mozilla.com/D29182
dom/serviceworkers/test/test_serviceworker_interfaces.js
dom/tests/mochitest/general/test_interfaces.js
dom/workers/test/test_worker_interfaces.js
js/xpconnect/tests/chrome/test_xrayToJS.xul
modules/libpref/init/StaticPrefList.h
modules/libpref/init/all.js
--- a/dom/serviceworkers/test/test_serviceworker_interfaces.js
+++ b/dom/serviceworkers/test/test_serviceworker_interfaces.js
@@ -22,19 +22,19 @@
 // IMPORTANT: Do not change this list without review from
 //            a JavaScript Engine peer!
 var ecmaGlobals =
   [
     "Array",
     "ArrayBuffer",
     {name: "Atomics", disabled: true},
     "Boolean",
-    {name: "BigInt", nightly: true},
-    {name: "BigInt64Array", nightly: true},
-    {name: "BigUint64Array", nightly: true},
+    "BigInt",
+    "BigInt64Array",
+    "BigUint64Array",
     {name: "ByteLengthQueuingStrategy", optional: true},
     {name: "CountQueuingStrategy", optional: true},
     "DataView",
     "Date",
     "Error",
     "EvalError",
     "Float32Array",
     "Float64Array",
--- a/dom/tests/mochitest/general/test_interfaces.js
+++ b/dom/tests/mochitest/general/test_interfaces.js
@@ -39,19 +39,19 @@ const isFennec = isAndroid && SpecialPow
 
 // IMPORTANT: Do not change this list without review from
 //            a JavaScript Engine peer!
 var ecmaGlobals =
   [
     {name: "Array", insecureContext: true},
     {name: "ArrayBuffer", insecureContext: true},
     {name: "Atomics", insecureContext: true, disabled: true},
-    {name: "BigInt", insecureContext: true, nightly: true},
-    {name: "BigInt64Array", insecureContext: true, nightly: true},
-    {name: "BigUint64Array", insecureContext: true, nightly: true},
+    {name: "BigInt", insecureContext: true},
+    {name: "BigInt64Array", insecureContext: true},
+    {name: "BigUint64Array", insecureContext: true},
     {name: "Boolean", insecureContext: true},
     {name: "ByteLengthQueuingStrategy", insecureContext: true},
     {name: "CountQueuingStrategy", insecureContext: true},
     {name: "DataView", insecureContext: true},
     {name: "Date", insecureContext: true},
     {name: "Error", insecureContext: true},
     {name: "EvalError", insecureContext: true},
     {name: "Float32Array", insecureContext: true},
--- a/dom/workers/test/test_worker_interfaces.js
+++ b/dom/workers/test/test_worker_interfaces.js
@@ -27,19 +27,19 @@
 
 // IMPORTANT: Do not change this list without review from
 //            a JavaScript Engine peer!
 var ecmaGlobals =
   [
     {name: "Array", insecureContext: true},
     {name: "ArrayBuffer", insecureContext: true},
     {name: "Atomics", insecureContext: true, disabled: true},
-    {name: "BigInt", insecureContext: true, nightly: true},
-    {name: "BigInt64Array", insecureContext: true, nightly: true},
-    {name: "BigUint64Array", insecureContext: true, nightly: true},
+    {name: "BigInt", insecureContext: true},
+    {name: "BigInt64Array", insecureContext: true},
+    {name: "BigUint64Array", insecureContext: true},
     {name: "Boolean", insecureContext: true},
     {name: "ByteLengthQueuingStrategy", insecureContext: true},
     {name: "CountQueuingStrategy", insecureContext: true},
     {name: "DataView", insecureContext: true},
     {name: "Date", insecureContext: true},
     {name: "Error", insecureContext: true},
     {name: "EvalError", insecureContext: true},
     {name: "Float32Array", insecureContext: true},
--- a/js/xpconnect/tests/chrome/test_xrayToJS.xul
+++ b/js/xpconnect/tests/chrome/test_xrayToJS.xul
@@ -287,23 +287,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   gConstructorProperties['WeakSet'] =
     constructorProps([]);
 
   gPrototypeProperties['DataView'] =
     ["constructor", "buffer", "byteLength", "byteOffset", Symbol.toStringTag,
      "getInt8", "getUint8", "getInt16", "getUint16",
      "getInt32", "getUint32", "getFloat32", "getFloat64",
      "setInt8", "setUint8", "setInt16", "setUint16",
-     "setInt32", "setUint32", "setFloat32", "setFloat64"];
-  if (isNightlyBuild) {
-    for (const p of ["getBigInt64", "getBigUint64",
-                     "setBigInt64", "setBigUint64"]) {
-      gPrototypeProperties['DataView'].push(p)
-    }
-  }
+     "setInt32", "setUint32", "setFloat32", "setFloat64",
+     "getBigInt64", "getBigUint64", "setBigInt64", "setBigUint64"]
   gConstructorProperties['DataView'] = constructorProps([]);
 
   // Sort an array that may contain symbols as well as strings.
   function sortProperties(arr) {
     function sortKey(prop) {
       return typeof prop + ":" + prop.toString();
     }
     arr.sort((a, b) => sortKey(a) < sortKey(b) ? -1 : +1);
@@ -1084,40 +1079,30 @@ for (var prop of props) {
                    "setInt32", "setUint32", "setFloat32", "setFloat64"];
 
       for (const f of get) {
         let x = t[f](0);
         is(x, 0, `${f} is 0 for "${constructor}"`);
         is(typeof x, 'number', `typeof ${f} is number for "${constructor}"`);
       }
 
-      if (isNightlyBuild) {
-        for (const f of ["getBigInt64", "getBigUint64"]) {
-          let x = t[f](0);
-          is(x, BigInt(0), `${f} is 0n for "${constructor}"`);
-          is(typeof x, 'bigint', `typeof ${f} is bigint for "${constructor}"`);
-        }
-      } else {
-        for (const f of ["getBigInt64", "getBigUint64",
-                         "setBigInt64", "setBugUint64"]) {
-          is(t[f], undefined, `${constructor} has no "${f}"`);
-          ok(!(f in t), `no "${f}" in ${constructor}`);
-        }
+      for (const f of ["getBigInt64", "getBigUint64"]) {
+        let x = t[f](0);
+        is(x, BigInt(0), `${f} is 0n for "${constructor}"`);
+        is(typeof x, 'bigint', `typeof ${f} is bigint for "${constructor}"`);
       }
 
       for (let i = 0; i < set.length; i++) {
         t[set[i]](0, 13);
         is(t[get[i]](0), 13, `${get[i]}(0) afer ${set[i]}(0, 13) is 13 for "${constructor}"`);
       }
 
-      if (isNightlyBuild) {
-        for (const k of ["BigInt64", "BigUint64"]) {
-          t["set" + k](0, BigInt(13));
-          is(t["get" + k](0), BigInt(13), `get${k}(0) afer set${k}(0, 13n) is 13n for "${constructor}"`);
-        }
+      for (const k of ["BigInt64", "BigUint64"]) {
+        t["set" + k](0, BigInt(13));
+        is(t["get" + k](0), BigInt(13), `get${k}(0) afer set${k}(0, 13n) is 13n for "${constructor}"`);
       }
     }
   }
 
   function testNumber() {
     // We don't actually support Xrays to Number yet.  This is testing
     // that case.  If we add such support, we might have to start
     // using a different non-Xrayed class here, if we can find one.
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -1391,28 +1391,22 @@ VARCACHE_PREF(
 
 // Streams API
 VARCACHE_PREF(
   "javascript.options.streams",
    javascript_options_streams,
   RelaxedAtomicBool, false
 )
 
-#ifdef NIGHTLY_BUILD
-# define PREF_VALUE true
-#else
-# define PREF_VALUE false
-#endif
 // BigInt API
 VARCACHE_PREF(
   "javascript.options.bigint",
    javascript_options_bigint,
-  RelaxedAtomicBool, PREF_VALUE
+  RelaxedAtomicBool, true
 )
-#undef PREF_VALUE
 
 VARCACHE_PREF(
   "javascript.options.experimental.fields",
    javascript_options_experimental_fields,
   RelaxedAtomicBool, false
 )
 
 VARCACHE_PREF(
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1555,23 +1555,16 @@ pref("javascript.options.spectre.object_
 pref("javascript.options.spectre.string_mitigations", true);
 pref("javascript.options.spectre.value_masking", true);
 pref("javascript.options.spectre.jit_to_C++_calls", true);
 #endif
 
 // Streams API
 pref("javascript.options.streams", true);
 
-// BigInt API
-#ifdef NIGHTLY_BUILD
-pref("javascript.options.bigint", true);
-#else
-pref("javascript.options.bigint", false);
-#endif
-
 pref("javascript.options.experimental.fields", false);
 
 pref("javascript.options.experimental.await_fix", false);
 
 // Dynamic module import.
 pref("javascript.options.dynamicImport", true);
 
 // advanced prefs