Removes offset and renames set to append

This commit is contained in:
Yury Delendik 2012-08-22 13:34:01 -05:00
parent aa00fe44c4
commit 19c62f526c

View File

@ -131,7 +131,7 @@ function PdfDataListener(length) {
} }
PdfDataListener.prototype = { PdfDataListener.prototype = {
set: function PdfDataListener_set(chunk, offset) { append: function PdfDataListener_append(chunk) {
var willBeLoaded = this.loaded + chunk.length; var willBeLoaded = this.loaded + chunk.length;
if (this.length >= 0 && this.length < willBeLoaded) { if (this.length >= 0 && this.length < willBeLoaded) {
this.length = -1; // reset the length, server is giving incorrect one this.length = -1; // reset the length, server is giving incorrect one
@ -462,7 +462,7 @@ PdfStreamConverter.prototype = {
var binaryStream = this.binaryStream; var binaryStream = this.binaryStream;
binaryStream.setInputStream(aInputStream); binaryStream.setInputStream(aInputStream);
this.dataListener.set(binaryStream.readByteArray(aCount), aOffset); this.dataListener.append(binaryStream.readByteArray(aCount));
}, },
// nsIRequestObserver::onStartRequest // nsIRequestObserver::onStartRequest