From 5aac2fe0fc32ba0d516783ee0c7702dcfd8eb0f9 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Mon, 2 Feb 2015 20:09:40 -0800 Subject: [PATCH] Bug 1125991 - Make JS callers of ios.newChannel call ios.newChannel2 in toolkit/components/jsdownloads (r=paolo) --- toolkit/components/jsdownloads/src/DownloadCore.jsm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toolkit/components/jsdownloads/src/DownloadCore.jsm b/toolkit/components/jsdownloads/src/DownloadCore.jsm index 44937bd1e902..2dc5930423c3 100644 --- a/toolkit/components/jsdownloads/src/DownloadCore.jsm +++ b/toolkit/components/jsdownloads/src/DownloadCore.jsm @@ -1907,7 +1907,14 @@ this.DownloadCopySaver.prototype = { // Create a channel from the source, and listen to progress // notifications. - let channel = NetUtil.newChannel(NetUtil.newURI(download.source.url)); + let channel = NetUtil.newChannel2(download.source.url, + null, + null, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); if (channel instanceof Ci.nsIPrivateBrowsingChannel) { channel.setPrivate(download.source.isPrivate); }