Bug 838102 - activities are saved in the manifest with a modified href after an update r=julienw
authorFabrice Desré <fabrice@mozilla.com>
Sun, 10 Feb 2013 10:54:13 -0800
changeset 121471 b9df99fb47ba99df2253a1b0f7af3ac34cdd31d2
parent 121470 50153480218cb81ea6aa3d6de15b89fbc57cce32
child 121472 b06c27ea62a8727d048c4dbc8ade2998b3187fd7
push id22750
push userfdesre@mozilla.com
push dateSun, 10 Feb 2013 18:54:25 +0000
treeherdermozilla-inbound@b9df99fb47ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjulienw
bugs838102
milestone21.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 838102 - activities are saved in the manifest with a modified href after an update r=julienw
dom/apps/src/Webapps.jsm
--- a/dom/apps/src/Webapps.jsm
+++ b/dom/apps/src/Webapps.jsm
@@ -506,39 +506,40 @@ this.DOMApplicationRegistry = {
 
     if (!root.activities) {
       return activitiesToRegister;
     }
 
     let manifest = new ManifestHelper(aManifest, aApp.origin);
     for (let activity in root.activities) {
       let description = root.activities[activity];
-      if (!description.href) {
-        description.href = manifest.launch_path;
+      let href = description.href;
+      if (!href) {
+        href = manifest.launch_path;
       }
 
       try {
-        description.href = manifest.resolveFromOrigin(description.href);
+        href = manifest.resolveFromOrigin(href);
       } catch (e) {
-        debug("Activity href (" + description.href + ") is invalid, skipping. " +
+        debug("Activity href (" + href + ") is invalid, skipping. " +
               "Error is: " + e);
         continue;
       }
 
       debug('_createActivitiesToRegister: ' + aApp.manifestURL + ', activity ' +
-          activity + ', description.href is ' + description.href);
+          activity + ', description.href is ' + href);
 
       if (aRunUpdate) {
         activitiesToRegister.push({ "manifest": aApp.manifestURL,
                                     "name": activity,
                                     "icon": manifest.iconURLForSize(128),
                                     "description": description });
       }
 
-      let launchPath = Services.io.newURI(description.href, null, null);
+      let launchPath = Services.io.newURI(href, null, null);
       let manifestURL = Services.io.newURI(aApp.manifestURL, null, null);
 
       if (SystemMessagePermissionsChecker
             .isSystemMessagePermittedToRegister("activity",
                                                 aApp.origin,
                                                 aManifest)) {
         msgmgr.registerPage("activity", launchPath, manifestURL);
       }