author | Vivien Nicolas <21@vingtetun.org> |
Mon, 03 Dec 2012 23:46:57 +0100 | |
changeset 114853 | 66888378b4ac091ee5e2564b65b2a45c94d806a2 |
parent 114852 | b6e705adb98a048b71a73ee5780d1665ae0554b3 |
child 114854 | 305129d04cd1f6362e1e29b127c202ac768a9145 |
push id | 23947 |
push user | emorley@mozilla.com |
push date | Tue, 04 Dec 2012 14:54:11 +0000 |
treeherder | mozilla-central@0035f77045bc [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | fabrice, blocking-basecamp |
bugs | 812119 |
milestone | 20.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
dom/apps/src/Webapps.js | file | annotate | diff | comparison | revisions | |
dom/apps/src/Webapps.jsm | file | annotate | diff | comparison | revisions |
--- a/dom/apps/src/Webapps.js +++ b/dom/apps/src/Webapps.js @@ -739,18 +739,22 @@ WebappsApplicationMgmt.prototype = { let app = msg.app; let event = new this._window.MozApplicationEvent("applicationinstall", { application : createApplicationObject(this._window, app) }); this._oninstall.handleEvent(event); } break; case "Webapps:Uninstall:Return:OK": if (this._onuninstall) { + let detail = { + manifestURL: msg.manifestURL, + origin: msg.origin + }; let event = new this._window.MozApplicationEvent("applicationuninstall", - { application : createApplicationObject(this._window, { origin: msg.origin }) }); + { application : createApplicationObject(this._window, detail) }); this._onuninstall.handleEvent(event); } break; } this.removeRequest(msg.requestID); }, classID: Components.ID("{8c1bca96-266f-493a-8d57-ec7a95098c15}"),
--- a/dom/apps/src/Webapps.jsm +++ b/dom/apps/src/Webapps.jsm @@ -1533,17 +1533,17 @@ this.DOMApplicationRegistry = { uninstall: function(aData, aMm) { for (let id in this.webapps) { let app = this.webapps[id]; if (app.origin != aData.origin) { continue; } - if (!this.webapps[id].removable) + if (!app.removable) return; // Clean up the deprecated manifest cache if needed. if (id in this._manifestCache) { delete this._manifestCache[id]; } // Clear private data first. @@ -1564,16 +1564,17 @@ this.DOMApplicationRegistry = { let dir = this._getAppDir(id); try { dir.remove(true); } catch (e) {} delete this.webapps[id]; this._saveApps((function() { + aData.manifestURL = app.manifestURL; this.broadcastMessage("Webapps:Uninstall:Return:OK", aData); Services.obs.notifyObservers(this, "webapps-sync-uninstall", appNote); this.broadcastMessage("Webapps:RemoveApp", { id: id }); }).bind(this)); return; } @@ -1763,23 +1764,25 @@ this.DOMApplicationRegistry = { continue; // Clean up the deprecated manifest cache if needed. if (record.id in this._manifestCache) { delete this._manifestCache[record.id]; } let origin = this.webapps[record.id].origin; + let manifestURL = this.webapps[record.id].manifestURL; delete this.webapps[record.id]; let dir = this._getAppDir(record.id); try { dir.remove(true); } catch (e) { } - this.broadcastMessage("Webapps:Uninstall:Return:OK", { origin: origin }); + this.broadcastMessage("Webapps:Uninstall:Return:OK", { origin: origin, + manifestURL: manifestURL }); } else { if (this.webapps[record.id]) { this.webapps[record.id] = record.value; delete this.webapps[record.id].manifest; } else { let data = { app: record.value }; this.confirmInstall(data, true); this.broadcastMessage("Webapps:Install:Return:OK", data);