mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-25 08:37:30 +09:00
Use modern syntax to call NetUtil.newChannel() in _SessionFile.jsm
This commit is contained in:
parent
e05e624eb8
commit
1f560c7d2f
1 changed files with 4 additions and 1 deletions
|
|
@ -156,7 +156,10 @@ let SessionFileInternal = {
|
||||||
let text;
|
let text;
|
||||||
try {
|
try {
|
||||||
let file = new FileUtils.File(aPath);
|
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();
|
let stream = chan.open();
|
||||||
text = NetUtil.readInputStreamToString(stream, stream.available(),
|
text = NetUtil.readInputStreamToString(stream, stream.available(),
|
||||||
{charset: "utf-8"});
|
{charset: "utf-8"});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue