зеркало из https://github.com/mozilla/gecko-dev.git
Bug 778277 - Add support for multiple apps per origin r=myk
This commit is contained in:
Родитель
de907469bc
Коммит
b3c2d76e2f
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче