Bug 1087742: Make JS callers of ios.newChannel call ios.newChannel2 in testing/ (r=jmaher)

This commit is contained in:
Christoph Kerschbaumer 2014-10-24 15:23:45 -07:00
parent d65c89962c
commit 8baf870b37

View File

@ -184,7 +184,14 @@ SpecialPowersObserverAPI.prototype = {
// to evaluate http:// urls...
var scriptableStream = Cc["@mozilla.org/scriptableinputstream;1"]
.getService(Ci.nsIScriptableInputStream);
var channel = Services.io.newChannel(aUrl, null, null);
var channel = Services.io.newChannel2(aUrl,
null,
null,
null, // aLoadingNode
Services.scriptSecurityManager.getSystemPrincipal(),
null, // aTriggeringPrincipal
Ci.nsILoadInfo.SEC_NORMAL,
Ci.nsIContentPolicy.TYPE_OTHER);
var input = channel.open();
scriptableStream.init(input);