From 90c9e663739c5eb06180c59ce8e505c21658a6e3 Mon Sep 17 00:00:00 2001 From: Yulia Startsev Date: Wed, 9 Nov 2022 09:24:14 +0000 Subject: [PATCH] Bug 1799619 - Disable array grouping by default on nightly; r=mgaudet Differential Revision: https://phabricator.services.mozilla.com/D161567 --- js/public/RealmOptions.h | 2 +- js/src/shell/js.cpp | 2 +- js/xpconnect/src/XPCJSContext.cpp | 2 +- js/xpconnect/tests/chrome/test_xrayToJS.xhtml | 4 ---- modules/libpref/init/StaticPrefList.yaml | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/js/public/RealmOptions.h b/js/public/RealmOptions.h index 18faae3c257d..58c2405a142a 100644 --- a/js/public/RealmOptions.h +++ b/js/public/RealmOptions.h @@ -278,7 +278,7 @@ class JS_PUBLIC_API RealmCreationOptions { bool iteratorHelpers_ = false; bool shadowRealms_ = false; #ifdef NIGHTLY_BUILD - bool arrayGrouping_ = true; + bool arrayGrouping_ = false; bool arrayFromAsync_ = false; #endif #ifdef ENABLE_CHANGE_ARRAY_BY_COPY diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 2f01ae9ec4ee..c3756a96a577 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -611,7 +611,7 @@ bool shell::enablePropertyErrorMessageFix = false; bool shell::enableIteratorHelpers = false; bool shell::enableShadowRealms = false; #ifdef NIGHTLY_BUILD -bool shell::enableArrayGrouping = true; +bool shell::enableArrayGrouping = false; bool shell::enableArrayFromAsync = false; #endif #ifdef ENABLE_CHANGE_ARRAY_BY_COPY diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp index c08b3d8a8894..63ab069037cd 100644 --- a/js/xpconnect/src/XPCJSContext.cpp +++ b/js/xpconnect/src/XPCJSContext.cpp @@ -778,7 +778,7 @@ static mozilla::Atomic sWeakRefsExposeCleanupSome(false); static mozilla::Atomic sIteratorHelpersEnabled(false); static mozilla::Atomic sShadowRealmsEnabled(false); #ifdef NIGHTLY_BUILD -static mozilla::Atomic sArrayGroupingEnabled(true); +static mozilla::Atomic sArrayGroupingEnabled(false); #endif #ifdef ENABLE_CHANGE_ARRAY_BY_COPY static mozilla::Atomic sChangeArrayByCopyEnabled(false); diff --git a/js/xpconnect/tests/chrome/test_xrayToJS.xhtml b/js/xpconnect/tests/chrome/test_xrayToJS.xhtml index 7b327c9c0aa7..99470cfc422c 100644 --- a/js/xpconnect/tests/chrome/test_xrayToJS.xhtml +++ b/js/xpconnect/tests/chrome/test_xrayToJS.xhtml @@ -235,10 +235,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=933681 "includes", "forEach", "map", "reduce", "reduceRight", "filter", "some", "every", "find", "findIndex", "copyWithin", "fill", Symbol.iterator, Symbol.unscopables, "entries", "keys", "values", "constructor", "flat", "flatMap", "at", "findLast", "findLastIndex"]; - if (isNightlyBuild) { - gPrototypeProperties.Array.push("group"); - gPrototypeProperties.Array.push("groupToMap"); - } gConstructorProperties.Array = constructorProps(["isArray", "from", "of", Symbol.species]); for (let c of typedArrayClasses) { diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index fdfd5ed4ffa5..1f52f86a10b3 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -7293,7 +7293,7 @@ # Experimental support for Array Grouping in JavaScript. - name: javascript.options.experimental.array_grouping type: bool - value: true + value: false mirror: always #endif // NIGHTLY_BUILD