Bug 1233899 - fix the feeds converter to use default user context origin attributes. r=baku
authorDave Huseby <dhuseby@mozilla.com>
Mon, 06 Jun 2016 14:22:00 +0200
changeset 300838 8e052220dd9eb6e0f9358a6eea0743f6caa83f64
parent 300837 69c00649c977ab88b19064b4dda04a90f454526f
child 300839 941fd40d73de36e08efb0590a1ad1900602d1d37
push id19599
push usercbook@mozilla.com
push dateWed, 08 Jun 2016 10:16:21 +0000
treeherderfx-team@81f4cc3f6f4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1233899
milestone50.0a1
Bug 1233899 - fix the feeds converter to use default user context origin attributes. r=baku (HEAD -> Bug_1233899) passing origin attributes from loading channel to feed rendering page.
browser/components/feeds/FeedConverter.js
--- a/browser/components/feeds/FeedConverter.js
+++ b/browser/components/feeds/FeedConverter.js
@@ -250,18 +250,21 @@ FeedConverter.prototype = {
         // Store the result in the result service so that the display
         // page can access it.
         feedService.addFeedResult(result);
 
         // Now load the actual XUL document.
         let aboutFeedsURI = ios.newURI("about:feeds", null, null);
         chromeChannel = ios.newChannelFromURIWithLoadInfo(aboutFeedsURI, loadInfo);
         chromeChannel.originalURI = result.uri;
+
+        // carry the origin attributes from the channel that loaded the feed.
         chromeChannel.owner =
-          Services.scriptSecurityManager.createCodebasePrincipal(aboutFeedsURI, {});
+          Services.scriptSecurityManager.createCodebasePrincipal(aboutFeedsURI,
+                                                                 loadInfo.originAttributes);
       } else {
         chromeChannel = ios.newChannelFromURIWithLoadInfo(result.uri, loadInfo);
       }
 
       chromeChannel.loadGroup = this._request.loadGroup;
       chromeChannel.asyncOpen(this._listener, null);
     }
     finally {