mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 893848 - Manifest properties aren't updated when installing apps multiple times. r=fabrice
This commit is contained in:
parent
ce5974e3b3
commit
7ce4dbf948
@ -149,6 +149,11 @@ WebappsActor.prototype = {
|
||||
let reg = DOMApplicationRegistry;
|
||||
let self = this;
|
||||
|
||||
// Clean up the deprecated manifest cache if needed.
|
||||
if (aId in reg._manifestCache) {
|
||||
delete reg._manifestCache[aId];
|
||||
}
|
||||
|
||||
aApp.installTime = Date.now();
|
||||
aApp.installState = "installed";
|
||||
aApp.removable = true;
|
||||
@ -167,12 +172,24 @@ WebappsActor.prototype = {
|
||||
|
||||
reg._saveApps(function() {
|
||||
aApp.manifest = manifest;
|
||||
|
||||
// Needed to evict manifest cache on content side
|
||||
// (has to be dispatched first, otherwise other messages like
|
||||
// Install:Return:OK are going to use old manifest version)
|
||||
reg.broadcastMessage("Webapps:PackageEvent",
|
||||
{ type: "installed",
|
||||
manifestURL: aApp.manifestURL,
|
||||
app: aApp,
|
||||
manifest: manifest
|
||||
});
|
||||
|
||||
reg.broadcastMessage("Webapps:AddApp", { id: aId, app: aApp });
|
||||
reg.broadcastMessage("Webapps:Install:Return:OK",
|
||||
{ app: aApp,
|
||||
oid: "foo",
|
||||
requestID: "bar"
|
||||
});
|
||||
|
||||
delete aApp.manifest;
|
||||
self.conn.send({ from: self.actorID,
|
||||
type: "webappsEvent",
|
||||
|
Loading…
Reference in New Issue
Block a user