mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Removes offset and renames set to append
This commit is contained in:
parent
aa00fe44c4
commit
19c62f526c
1 changed files with 2 additions and 2 deletions
|
@ -131,7 +131,7 @@ function PdfDataListener(length) {
|
|||
}
|
||||
|
||||
PdfDataListener.prototype = {
|
||||
set: function PdfDataListener_set(chunk, offset) {
|
||||
append: function PdfDataListener_append(chunk) {
|
||||
var willBeLoaded = this.loaded + chunk.length;
|
||||
if (this.length >= 0 && this.length < willBeLoaded) {
|
||||
this.length = -1; // reset the length, server is giving incorrect one
|
||||
|
@ -462,7 +462,7 @@ PdfStreamConverter.prototype = {
|
|||
|
||||
var binaryStream = this.binaryStream;
|
||||
binaryStream.setInputStream(aInputStream);
|
||||
this.dataListener.set(binaryStream.readByteArray(aCount), aOffset);
|
||||
this.dataListener.append(binaryStream.readByteArray(aCount));
|
||||
},
|
||||
|
||||
// nsIRequestObserver::onStartRequest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue