Bug 778277 - Add support for multiple apps per origin r=myk

This commit is contained in:
Fabrice Desré 2014-07-22 13:08:21 -07:00
parent de907469bc
commit b3c2d76e2f
2 changed files with 4 additions and 7 deletions

View File

@ -884,7 +884,7 @@ WebappsApplicationMgmt.prototype = {
}
break;
case "Webapps:Uninstall:Return:OK":
Services.DOMRequest.fireSuccess(req, msg.origin);
Services.DOMRequest.fireSuccess(req, msg.manifestURL);
break;
case "Webapps:Uninstall:Return:KO":
Services.DOMRequest.fireError(req, "NOT_INSTALLED");

View File

@ -2080,14 +2080,11 @@ this.DOMApplicationRegistry = {
return false;
}
// Disallow multiple hosted apps installations from the same origin for now.
// We will remove this code after multiple apps per origin are supported (bug 778277).
// This will also disallow reinstalls from the same origin for now.
// Disallow reinstalls from the same manifest url for now.
for (let id in this.webapps) {
if (this.webapps[id].origin == app.origin &&
!this.webapps[id].packageHash &&
if (this.webapps[id].manifestURL == app.manifestURL &&
this._isLaunchable(this.webapps[id])) {
sendError("MULTIPLE_APPS_PER_ORIGIN_FORBIDDEN");
sendError("REINSTALL_FORBIDDEN");
return false;
}
}