Bug 1087737: Make JS callers of ios.newChannel call ios.newChannel2 in mobile/ (r=wesj)

This commit is contained in:
Christoph Kerschbaumer
2014-10-24 15:01:55 -07:00
parent 13f3370f94
commit 5868d5b1d7
4 changed files with 29 additions and 9 deletions

View File

@@ -62,7 +62,12 @@ HelperAppLauncherDialog.prototype = {
// For all other URIs, try to resolve them to an inner URI, and check that.
if (!alreadyResolved) {
let ioSvc = Cc["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
let innerURI = ioSvc.newChannelFromURI(url).URI;
let innerURI = ioSvc.newChannelFromURI2(url,
null, // aLoadingNode
Services.scriptSecurityManager.getSystemPrincipal(),
null, // aTriggeringPrincipal
Ci.nsILoadInfo.SEC_NORMAL,
Ci.nsIContentPolicy.TYPE_OTHER).URI;
if (!url.equals(innerURI)) {
return this._canDownload(innerURI, true);
}