mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Issue #1053 - Remove no longer used function and modules from UserAgentUpdates.jsm
This commit is contained in:
parent
0333159186
commit
efb161c255
1 changed files with 0 additions and 30 deletions
|
|
@ -16,15 +16,9 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|||
XPCOMUtils.defineLazyModuleGetter(
|
||||
this, "FileUtils", "resource://gre/modules/FileUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(
|
||||
this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(
|
||||
this, "OS", "resource://gre/modules/osfile.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(
|
||||
this, "Promise", "resource://gre/modules/Promise.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(
|
||||
this, "UpdateUtils", "resource://gre/modules/UpdateUtils.jsm");
|
||||
|
||||
|
|
@ -64,30 +58,6 @@ const PREF_APP_DISTRIBUTION_VERSION = "distribution.version";
|
|||
|
||||
var gInitialized = false;
|
||||
|
||||
function readChannel(url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
let channel = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
|
||||
channel.contentType = "application/json";
|
||||
|
||||
NetUtil.asyncFetch(channel, (inputStream, status) => {
|
||||
if (!Components.isSuccessCode(status)) {
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
|
||||
let data = JSON.parse(
|
||||
NetUtil.readInputStreamToString(inputStream, inputStream.available())
|
||||
);
|
||||
resolve(data);
|
||||
});
|
||||
} catch (ex) {
|
||||
reject(new Error("UserAgentUpdates: Could not fetch " + url + " " +
|
||||
ex + "\n" + ex.stack));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.UserAgentUpdates = {
|
||||
init: function(callback) {
|
||||
if (gInitialized) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue