Use modern syntax to call NetUtil.newChannel() in _SessionFile.jsm

This commit is contained in:
JustOff 2018-04-14 03:08:55 +03:00 committed by Roy Tam
commit 1f560c7d2f

View file

@ -156,7 +156,10 @@ let SessionFileInternal = {
let text;
try {
let file = new FileUtils.File(aPath);
let chan = NetUtil.newChannel(file);
let chan = NetUtil.newChannel({
uri: NetUtil.newURI(file),
loadUsingSystemPrincipal: true
});
let stream = chan.open();
text = NetUtil.readInputStreamToString(stream, stream.available(),
{charset: "utf-8"});