diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-05-14 10:50:01 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-05-14 10:50:01 +0200 |
commit | e9dd029f5d00590e1a53e63b0ab805110a10b54c (patch) | |
tree | 1126ca5dda925a62be3dc12c99c90e953d08afcf /toolkit/modules | |
parent | 9d6a7ae25d7f5da855a8f8df884de483b4e2a538 (diff) | |
parent | 36b8fd734f590eb726ca2e50f8d1ff9cc968b8e1 (diff) | |
download | UXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.tar UXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.tar.gz UXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.tar.lz UXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.tar.xz UXP-e9dd029f5d00590e1a53e63b0ab805110a10b54c.zip |
Merge branch 'master' into Basilisk-release
Diffstat (limited to 'toolkit/modules')
-rw-r--r-- | toolkit/modules/AppConstants.jsm | 33 | ||||
-rw-r--r-- | toolkit/modules/Sqlite.jsm | 2 | ||||
-rw-r--r-- | toolkit/modules/Troubleshoot.jsm | 25 | ||||
-rw-r--r-- | toolkit/modules/UpdateUtils.jsm | 18 | ||||
-rw-r--r-- | toolkit/modules/sessionstore/Utils.jsm | 5 | ||||
-rw-r--r-- | toolkit/modules/tests/browser/browser_Troubleshoot.js | 4 |
6 files changed, 6 insertions, 81 deletions
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm index 2b18f3c1a..a0ca00935 100644 --- a/toolkit/modules/AppConstants.jsm +++ b/toolkit/modules/AppConstants.jsm @@ -81,20 +81,6 @@ this.AppConstants = Object.freeze({ false, #endif - MOZ_SANDBOX: -#ifdef MOZ_SANDBOX - true, -#else - false, -#endif - - MOZ_CONTENT_SANDBOX: -#ifdef MOZ_CONTENT_SANDBOX - true, -#else - false, -#endif - MOZ_TELEMETRY_REPORTING: #ifdef MOZ_TELEMETRY_REPORTING true, @@ -144,14 +130,6 @@ this.AppConstants = Object.freeze({ false, #endif -# MOZ_B2G covers both device and desktop b2g - MOZ_B2G: -#ifdef MOZ_B2G - true, -#else - false, -#endif - XP_UNIX: #ifdef XP_UNIX true, @@ -170,8 +148,6 @@ this.AppConstants = Object.freeze({ "macosx", #elif MOZ_WIDGET_ANDROID "android", -#elif MOZ_WIDGET_GONK - "gonk", #elif XP_LINUX "linux", #else @@ -218,13 +194,6 @@ this.AppConstants = Object.freeze({ false, #endif - MOZ_B2G_RIL: -#ifdef MOZ_B2G_RIL - true, -#else - false, -#endif - MOZ_GRAPHENE: #ifdef MOZ_GRAPHENE true, @@ -314,8 +283,6 @@ this.AppConstants = Object.freeze({ INSTALL_LOCALE: "@AB_CD@", MOZ_WIDGET_TOOLKIT: "@MOZ_WIDGET_TOOLKIT@", ANDROID_PACKAGE_NAME: "@ANDROID_PACKAGE_NAME@", - MOZ_B2G_VERSION: @MOZ_B2G_VERSION@, - MOZ_B2G_OS_NAME: @MOZ_B2G_OS_NAME@, DEBUG_JS_MODULES: "@DEBUG_JS_MODULES@", diff --git a/toolkit/modules/Sqlite.jsm b/toolkit/modules/Sqlite.jsm index e8d986c0e..6f7a7d94c 100644 --- a/toolkit/modules/Sqlite.jsm +++ b/toolkit/modules/Sqlite.jsm @@ -995,7 +995,7 @@ function cloneStorageConnection(options) { if (!source) { throw new TypeError("connection not specified in clone options."); } - if (!source instanceof Ci.mozIStorageAsyncConnection) { + if (!(source instanceof Ci.mozIStorageAsyncConnection)) { throw new TypeError("Connection must be a valid Storage connection."); } diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index 60f7e8666..e11d47774 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -530,28 +530,3 @@ var dataProviders = { } }; -if (AppConstants.MOZ_SANDBOX) { - dataProviders.sandbox = function sandbox(done) { - let data = {}; - if (AppConstants.platform == "linux") { - const keys = ["hasSeccompBPF", "hasSeccompTSync", - "hasPrivilegedUserNamespaces", "hasUserNamespaces", - "canSandboxContent", "canSandboxMedia"]; - - let sysInfo = Cc["@mozilla.org/system-info;1"]. - getService(Ci.nsIPropertyBag2); - for (let key of keys) { - if (sysInfo.hasKey(key)) { - data[key] = sysInfo.getPropertyAsBool(key); - } - } - } - - if (AppConstants.MOZ_CONTENT_SANDBOX) { - data.contentSandboxLevel = - Services.prefs.getIntPref("security.sandbox.content.level"); - } - - done(data); - } -} diff --git a/toolkit/modules/UpdateUtils.jsm b/toolkit/modules/UpdateUtils.jsm index ef8475364..e92b1b797 100644 --- a/toolkit/modules/UpdateUtils.jsm +++ b/toolkit/modules/UpdateUtils.jsm @@ -87,24 +87,6 @@ this.UpdateUtils = { url = url.replace(/%CUSTOM%/g, Preferences.get(PREF_APP_UPDATE_CUSTOM, "")); url = url.replace(/\+/g, "%2B"); - if (AppConstants.platform == "gonk") { - let sysLibs = {}; - Cu.import("resource://gre/modules/systemlibs.js", sysLibs); - let productDevice = sysLibs.libcutils.property_get("ro.product.device"); - let buildType = sysLibs.libcutils.property_get("ro.build.type"); - url = url.replace(/%PRODUCT_MODEL%/g, - sysLibs.libcutils.property_get("ro.product.model")); - if (buildType == "user" || buildType == "userdebug") { - url = url.replace(/%PRODUCT_DEVICE%/g, productDevice); - } else { - url = url.replace(/%PRODUCT_DEVICE%/g, productDevice + "-" + buildType); - } - url = url.replace(/%B2G_VERSION%/g, - Preferences.get(PREF_APP_B2G_VERSION, null)); - url = url.replace(/%IMEI%/g, - Preferences.get(PREF_APP_UPDATE_IMEI_HASH, "default")); - } - return url; } }; diff --git a/toolkit/modules/sessionstore/Utils.jsm b/toolkit/modules/sessionstore/Utils.jsm index 863bca6f5..25b75c71b 100644 --- a/toolkit/modules/sessionstore/Utils.jsm +++ b/toolkit/modules/sessionstore/Utils.jsm @@ -16,12 +16,17 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm", this); XPCOMUtils.defineLazyServiceGetter(this, "serializationHelper", "@mozilla.org/network/serialization-helper;1", "nsISerializationHelper"); +XPCOMUtils.defineLazyGetter(this, "SERIALIZED_SYSTEMPRINCIPAL", function() { + return Utils.serializePrincipal(Services.scriptSecurityManager.getSystemPrincipal()); +}); function debug(msg) { Services.console.logStringMessage("Utils: " + msg); } this.Utils = Object.freeze({ + get SERIALIZED_SYSTEMPRINCIPAL() { return SERIALIZED_SYSTEMPRINCIPAL; }, + makeURI: function (url) { return Services.io.newURI(url, null, null); }, diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js index 34c2a2791..7f0069dc9 100644 --- a/toolkit/modules/tests/browser/browser_Troubleshoot.js +++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js @@ -469,10 +469,6 @@ const SNAPSHOT_SCHEMA = { required: false, type: "boolean" }, - contentSandboxLevel: { - required: AppConstants.MOZ_CONTENT_SANDBOX, - type: "number" - }, }, }, }, |