Bug 779176 - Activities doesn't work with different entry points (not using href) [r=mounir]
authorFabrice Desré <fabrice@mozilla.com>
Thu, 09 Aug 2012 08:39:52 -0700
changeset 101964 66b421cf32b942cdcf40d2250db97a12ae64b261
parent 101963 2691aa65ac972e10c81fa243de076ac17697bef5
child 101965 c69b5af20a85c3e237cba78c87b0cb968214739f
push id13247
push userfdesre@mozilla.com
push dateThu, 09 Aug 2012 15:40:00 +0000
treeherdermozilla-inbound@66b421cf32b9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs779176
milestone17.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 779176 - Activities doesn't work with different entry points (not using href) [r=mounir]
dom/apps/src/Webapps.jsm
--- a/dom/apps/src/Webapps.jsm
+++ b/dom/apps/src/Webapps.jsm
@@ -119,17 +119,17 @@ let DOMApplicationRegistry = {
         "name": activity,
         "title": manifest.name,
         "icon": manifest.iconURLForSize(128),
         "description": description
       }
       cpmm.sendAsyncMessage("Activities:Register", json);
 
       let launchPath =
-        Services.io.newURI(manifest.fullLaunchPath(description.href), null, null);
+        Services.io.newURI(manifest.resolveFromOrigin(description.href), null, null);
       let manifestURL = Services.io.newURI(aApp.manifestURL, null, null);
       msgmgr.registerPage("activity", launchPath, manifestURL);
     }
   },
 
   _unregisterActivities: function(aManifest, aApp) {
     if (!aManifest.activities) {
       return;
@@ -997,15 +997,19 @@ DOMApplicationManifest.prototype = {
   },
 
   fullLaunchPath: function(aStartPoint) {
     let startPoint = aStartPoint || "";
     let launchPath = this._localeProp("launch_path") || "";
     return this._origin.resolve(launchPath + startPoint);
   },
 
+  resolveFromOrigin: function(aURI) {
+    return this._origin.resolve(aURI);
+  },
+
   fullAppcachePath: function() {
     let appcachePath = this._localeProp("appcache_path");
     return this._origin.resolve(appcachePath ? appcachePath : "");
   }
 };
 
 DOMApplicationRegistry.init();