[tbb-commits] [torbutton/maint-2.1] Bug 31140 - Do not enable IonMonkey at low security level on AARCH64

gk at torproject.org gk at torproject.org
Tue Aug 27 06:38:22 UTC 2019


commit 2a15af35080b9723d88e5111151f8cd889d592e0
Author: Matthew Finkel <Matthew.Finkel at gmail.com>
Date:   Mon Aug 19 16:18:40 2019 +0000

    Bug 31140 - Do not enable IonMonkey at low security level on AARCH64
---
 src/modules/security-prefs.js | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/modules/security-prefs.js b/src/modules/security-prefs.js
index fa97b70d..94480123 100644
--- a/src/modules/security-prefs.js
+++ b/src/modules/security-prefs.js
@@ -5,6 +5,11 @@
 let {classes: Cc, utils: Cu } = Components;
 let { getBoolPref, setBoolPref, getIntPref, setIntPref } =
     Cu.import("resource://gre/modules/Services.jsm", {}).Services.prefs;
+
+// Used for detecting the current system architecture
+let { XPCOMABI } =
+    Cu.import("resource://gre/modules/Services.jsm", {}).Services.appinfo;
+
 let { bindPref, bindPrefAndInit } =
     Cu.import("resource://torbutton/modules/utils.js", {});
 let logger = Components.classes["@torproject.org/torbutton-logger;1"]
@@ -41,8 +46,16 @@ const kCustomPref = "extensions.torbutton.security_custom";
 // to the pref database.
 var write_setting_to_prefs = function (settingIndex) {
   Object.keys(kSecuritySettings).forEach(
-    prefName => setBoolPref(
-      prefName, kSecuritySettings[prefName][settingIndex]));
+    prefName => {
+      // Bug 31140 - Do not enable IonMonkey on AARCH64.
+      if (XPCOMABI.split("-")[0] == "aarch64" &&
+          prefName == "javascript.options.ion") {
+        setBoolPref(prefName, false);
+        continue;
+      }
+      setBoolPref(
+        prefName, kSecuritySettings[prefName][settingIndex]);
+    });
 };
 
 // __read_setting_from_prefs()__.



More information about the tbb-commits mailing list