mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 778277 - Add support for multiple apps per origin r=myk
This commit is contained in:
parent
de907469bc
commit
b3c2d76e2f
@ -884,7 +884,7 @@ WebappsApplicationMgmt.prototype = {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "Webapps:Uninstall:Return:OK":
|
case "Webapps:Uninstall:Return:OK":
|
||||||
Services.DOMRequest.fireSuccess(req, msg.origin);
|
Services.DOMRequest.fireSuccess(req, msg.manifestURL);
|
||||||
break;
|
break;
|
||||||
case "Webapps:Uninstall:Return:KO":
|
case "Webapps:Uninstall:Return:KO":
|
||||||
Services.DOMRequest.fireError(req, "NOT_INSTALLED");
|
Services.DOMRequest.fireError(req, "NOT_INSTALLED");
|
||||||
|
@ -2080,14 +2080,11 @@ this.DOMApplicationRegistry = {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disallow multiple hosted apps installations from the same origin for now.
|
// Disallow reinstalls from the same manifest url 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.
|
|
||||||
for (let id in this.webapps) {
|
for (let id in this.webapps) {
|
||||||
if (this.webapps[id].origin == app.origin &&
|
if (this.webapps[id].manifestURL == app.manifestURL &&
|
||||||
!this.webapps[id].packageHash &&
|
|
||||||
this._isLaunchable(this.webapps[id])) {
|
this._isLaunchable(this.webapps[id])) {
|
||||||
sendError("MULTIPLE_APPS_PER_ORIGIN_FORBIDDEN");
|
sendError("REINSTALL_FORBIDDEN");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user