Fx60: Update nsIInputStreamPump init() calls

This commit is contained in:
Dan Stillman 2018-02-24 05:04:04 -05:00
parent 78e9db9523
commit 0ad308f5f6
4 changed files with 30 additions and 5 deletions

View file

@ -1397,7 +1397,12 @@ AsyncChannel.prototype = {
//Zotero.debug("AsyncChannel: Got input stream from generator");
var pump = Cc["@mozilla.org/network/input-stream-pump;1"].createInstance(Ci.nsIInputStreamPump);
pump.init(data, -1, -1, 0, 0, true);
try {
pump.init(data, 0, 0, true);
}
catch (e) {
pump.init(data, -1, -1, 0, 0, true);
}
pump.asyncRead(listenerWrapper, context);
}
else if (data instanceof Ci.nsIFile || data instanceof Ci.nsIURI) {