Bug 844243 - Installing a packaged app in which the mini-manifest app name is different than the webapp manifest app name is allowed, but should not be; r=fabrice

This commit is contained in:
Fernando Jiménez 2013-02-27 12:39:15 +01:00
parent a25a4df5d7
commit 7e87ab61d5

View File

@ -2315,9 +2315,16 @@ this.DOMApplicationRegistry = {
throw "INVALID_MANIFEST";
}
// Call ensureSameAppName before compareManifests, as `manifest`,
// has been normalized to avoid app rename.
AppsUtils.ensureSameAppName(aManifest._manifest, manifest, app);
// For app updates we don't forbid apps to rename themselves but
// we still retain the old name of the app. In the future we
// will use UI to allow updates to rename an app after we check
// with the user that the rename is ok.
if (aIsUpdate) {
// Call ensureSameAppName before compareManifests as `manifest`
// has been normalized to avoid app rename.
AppsUtils.ensureSameAppName(aManifest._manifest, manifest,
app);
}
if (!AppsUtils.compareManifests(manifest,
aManifest._manifest)) {