mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
Bug 1125991 - Make JS callers of ios.newChannel call ios.newChannel2 in toolkit/components/jsdownloads (r=paolo)
This commit is contained in:
parent
503f1e807e
commit
5aac2fe0fc
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user