mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Don't use UpdateChannel.jsm in nsBlocklistService.js
This commit is contained in:
parent
3c98d8f72d
commit
c6d0f188da
1 changed files with 8 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
@ -27,9 +29,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
|
|||
#ifdef MOZ_WEBEXTENSIONS
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
|
||||
"resource://gre/modules/UpdateUtils.jsm");
|
||||
#else
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "UpdateChannel",
|
||||
"resource://gre/modules/UpdateChannel.jsm");
|
||||
#endif
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "OS",
|
||||
"resource://gre/modules/osfile.jsm");
|
||||
|
|
@ -530,13 +529,14 @@ 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);
|
||||
|
|
@ -544,7 +544,7 @@ Blocklist.prototype = {
|
|||
#ifdef MOZ_WEBEXTENSIONS
|
||||
dsURI = dsURI.replace(/%CHANNEL%/g, UpdateUtils.UpdateChannel);
|
||||
#else
|
||||
dsURI = dsURI.replace(/%CHANNEL%/g, UpdateChannel.get());
|
||||
dsURI = dsURI.replace(/%CHANNEL%/g, "@MOZ_UPDATE_CHANNEL@");
|
||||
#endif
|
||||
dsURI = dsURI.replace(/%PLATFORM_VERSION%/g, gApp.platformVersion);
|
||||
dsURI = dsURI.replace(/%DISTRIBUTION%/g,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue