From b755435a535d418b625b228d84c6f0e1e2dfd2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Thu, 20 Dec 2012 12:08:58 -0800 Subject: [PATCH] Bug 823040 - we should update the app's manifest during update (for hosted apps with appcache) [r=ferjm] --- dom/apps/src/Webapps.jsm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom/apps/src/Webapps.jsm b/dom/apps/src/Webapps.jsm index 14b60db4c141..3d929f98ffbc 100644 --- a/dom/apps/src/Webapps.jsm +++ b/dom/apps/src/Webapps.jsm @@ -1122,10 +1122,12 @@ this.DOMApplicationRegistry = { aData.event = "downloadavailable"; aData.app = { downloadAvailable: true, - downloadSize: manifest.size + downloadSize: manifest.size, + updateManifest: aManifest } DOMApplicationRegistry._saveApps(function() { aMm.sendAsyncMessage("Webapps:CheckForUpdate:Return:OK", aData); + delete aData.app.updateManifest; }); } @@ -1174,6 +1176,7 @@ this.DOMApplicationRegistry = { this._saveApps(function() { aData.app = app; + app.manifest = aManifest; if (!manifest.appcache_path) { aData.event = "downloadapplied"; aMm.sendAsyncMessage("Webapps:CheckForUpdate:Return:OK", aData); @@ -1191,6 +1194,7 @@ this.DOMApplicationRegistry = { updateSvc.checkForUpdate(Services.io.newURI(aData.manifestURL, null, null), app.localId, false, updateObserver); } + delete app.manifest; }); // Update the permissions for this app.