mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1191579 - Remove useless getAll() implementation in Webapps.jsm
This commit is contained in:
parent
3338948bab
commit
cd1a7622f2
@ -738,7 +738,11 @@ this.DOMApplicationRegistry = {
|
|||||||
|
|
||||||
loadAndUpdateApps: function() {
|
loadAndUpdateApps: function() {
|
||||||
return Task.spawn(function*() {
|
return Task.spawn(function*() {
|
||||||
let runUpdate = AppsUtils.isFirstRun(Services.prefs);
|
let runUpdate = false;
|
||||||
|
try {
|
||||||
|
runUpdate = AppsUtils.isFirstRun(Services.prefs);
|
||||||
|
} catch(e) {}
|
||||||
|
|
||||||
let loadAppPermission = Services.prefs.getBoolPref("dom.apps.reset-permissions");
|
let loadAppPermission = Services.prefs.getBoolPref("dom.apps.reset-permissions");
|
||||||
|
|
||||||
yield this.loadCurrentRegistry();
|
yield this.loadCurrentRegistry();
|
||||||
@ -801,7 +805,7 @@ this.DOMApplicationRegistry = {
|
|||||||
// installPreinstalledApp() removes the ones failing to install.
|
// installPreinstalledApp() removes the ones failing to install.
|
||||||
this._saveApps();
|
this._saveApps();
|
||||||
|
|
||||||
Services.prefs.setBoolPref("dom.apps.reset-permissions", true);
|
Services.prefs.setBoolPref("dom.apps.reset-permissions", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DataStores must be initialized at startup.
|
// DataStores must be initialized at startup.
|
||||||
@ -4335,27 +4339,6 @@ this.DOMApplicationRegistry = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getAll: function(aCallback) {
|
|
||||||
debug("getAll");
|
|
||||||
let apps = [];
|
|
||||||
let tmp = [];
|
|
||||||
|
|
||||||
for (let id in this.webapps) {
|
|
||||||
let app = AppsUtils.cloneAppObject(this.webapps[id]);
|
|
||||||
if (!this._isLaunchable(app))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
apps.push(app);
|
|
||||||
tmp.push({ id: id });
|
|
||||||
}
|
|
||||||
|
|
||||||
this._readManifests(tmp).then((aResult) => {
|
|
||||||
for (let i = 0; i < aResult.length; i++)
|
|
||||||
apps[i].manifest = aResult[i].manifest;
|
|
||||||
aCallback(apps);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
/* Check if |data| is actually a receipt */
|
/* Check if |data| is actually a receipt */
|
||||||
isReceipt: function(data) {
|
isReceipt: function(data) {
|
||||||
try {
|
try {
|
||||||
|
@ -214,6 +214,9 @@ function WebappsActor(aConnection) {
|
|||||||
Cu.import("resource://gre/modules/FileUtils.jsm");
|
Cu.import("resource://gre/modules/FileUtils.jsm");
|
||||||
Cu.import("resource://gre/modules/MessageBroadcaster.jsm");
|
Cu.import("resource://gre/modules/MessageBroadcaster.jsm");
|
||||||
|
|
||||||
|
this.appsChild = {};
|
||||||
|
Cu.import("resource://gre/modules/AppsServiceChild.jsm", this.appsChild);
|
||||||
|
|
||||||
// Keep reference of already connected app processes.
|
// Keep reference of already connected app processes.
|
||||||
// values: app frame message manager
|
// values: app frame message manager
|
||||||
this._connectedApps = new Set();
|
this._connectedApps = new Set();
|
||||||
@ -688,8 +691,7 @@ WebappsActor.prototype = {
|
|||||||
debug("getAll");
|
debug("getAll");
|
||||||
|
|
||||||
let deferred = promise.defer();
|
let deferred = promise.defer();
|
||||||
let reg = DOMApplicationRegistry;
|
this.appsChild.DOMApplicationRegistry.getAll(apps => {
|
||||||
reg.getAll(apps => {
|
|
||||||
deferred.resolve({ apps: this._filterAllowedApps(apps) });
|
deferred.resolve({ apps: this._filterAllowedApps(apps) });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user