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 206604 49abfe360b14a091ef5e1d7bb56703de82b77e63
parent 206603 8730ce555151527e7dc59411b12c3df86e782442
child 206605 03eccac81e158aabf1e1fba832e13fb647d361b6
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [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);