mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +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 = {
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue