summaryrefslogtreecommitdiffstats
path: root/toolkit/components/blocklist
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-04-25 06:34:26 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-04-25 06:34:26 -0400
commita9ae19957093f64ade861acd5d212fa381c32532 (patch)
treec9d2968422e8ca81d7d01647c90cc457b47d941e /toolkit/components/blocklist
parentcb5d20deb7fed28887b9ea8edfad7792e59c1679 (diff)
downloadUXP-a9ae19957093f64ade861acd5d212fa381c32532.tar
UXP-a9ae19957093f64ade861acd5d212fa381c32532.tar.gz
UXP-a9ae19957093f64ade861acd5d212fa381c32532.tar.lz
UXP-a9ae19957093f64ade861acd5d212fa381c32532.tar.xz
UXP-a9ae19957093f64ade861acd5d212fa381c32532.zip
Don't use UpdateChannel.jsm in nsBlocklistService.js
Diffstat (limited to 'toolkit/components/blocklist')
-rw-r--r--toolkit/components/blocklist/nsBlocklistService.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/toolkit/components/blocklist/nsBlocklistService.js b/toolkit/components/blocklist/nsBlocklistService.js
index b0115e25d..788ce192f 100644
--- a/toolkit/components/blocklist/nsBlocklistService.js
+++ b/toolkit/components/blocklist/nsBlocklistService.js
@@ -4,6 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#filter substitution
+
"use strict";
const Cc = Components.classes;
@@ -24,8 +26,6 @@ try {
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
"resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "UpdateChannel",
- "resource://gre/modules/UpdateChannel.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "OS",
"resource://gre/modules/osfile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ServiceRequest",
@@ -525,18 +525,19 @@ Blocklist.prototype = {
pingCountTotal = 1;
dsURI = dsURI.replace(/%APP_ID%/g, gApp.ID);
+
// Not all applications implement nsIXULAppInfo (e.g. xpcshell doesn't).
- if (gApp.version)
+ if (gApp.version) {
dsURI = dsURI.replace(/%APP_VERSION%/g, gApp.version);
- dsURI = dsURI.replace(/%PRODUCT%/g, gApp.name);
- // Not all applications implement nsIXULAppInfo (e.g. xpcshell doesn't).
- if (gApp.version)
dsURI = dsURI.replace(/%VERSION%/g, gApp.version);
+ }
+
+ dsURI = dsURI.replace(/%PRODUCT%/g, gApp.name);
dsURI = dsURI.replace(/%BUILD_ID%/g, gApp.appBuildID);
dsURI = dsURI.replace(/%BUILD_TARGET%/g, gApp.OS + "_" + gABI);
dsURI = dsURI.replace(/%OS_VERSION%/g, gOSVersion);
dsURI = dsURI.replace(/%LOCALE%/g, getLocale());
- dsURI = dsURI.replace(/%CHANNEL%/g, UpdateChannel.get());
+ dsURI = dsURI.replace(/%CHANNEL%/g, "@MOZ_UPDATE_CHANNEL@");
dsURI = dsURI.replace(/%PLATFORM_VERSION%/g, gApp.platformVersion);
dsURI = dsURI.replace(/%DISTRIBUTION%/g,
getDistributionPrefValue(PREF_APP_DISTRIBUTION));