Bug 1013895 - Stop _processManifestForIds from modifying the registry. r=myk
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Sat, 07 Jun 2014 11:28:45 +0200
changeset 207688 49abfe360b14a091ef5e1d7bb56703de82b77e63
parent 207687 8730ce555151527e7dc59411b12c3df86e782442
child 207689 03eccac81e158aabf1e1fba832e13fb647d361b6
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmyk
bugs1013895
milestone32.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
Bug 1013895 - Stop _processManifestForIds from modifying the registry. r=myk
dom/apps/src/Webapps.jsm
--- a/dom/apps/src/Webapps.jsm
+++ b/dom/apps/src/Webapps.jsm
@@ -943,19 +943,22 @@ this.DOMApplicationRegistry = {
         let app = this.webapps[aResult.id];
         let manifest = aResult.manifest;
         if (!manifest) {
           // If we can't load the manifest, we probably have a corrupted
           // registry. We delete the app since we can't do anything with it.
           delete this.webapps[aResult.id];
           return;
         }
-        app.name = manifest.name;
+
+        let localeManifest = new ManifestHelper(manifest, app.origin);
+
+        app.name = localeManifest.name;
         app.csp = manifest.csp || "";
-        app.role = manifest.role || "";
+        app.role = localeManifest.role;
         if (app.appStatus >= Ci.nsIPrincipal.APP_STATUS_PRIVILEGED) {
           app.redirects = this.sanitizeRedirects(manifest.redirects);
         }
         this._registerSystemMessages(manifest, app);
         this._registerInterAppConnections(manifest, app);
         appsToRegister.push({ manifest: manifest, app: app });
       });
       this._registerActivitiesForApps(appsToRegister, aRunUpdate);