[Pkg-javascript-commits] [pdf.js] 135/246: Revert commit 9a41659 (PR 5005) for breaking the loading of certain PDF files in the Firefox addon when range requests are active

David Prévot taffit at moszumanska.debian.org
Sun Sep 7 15:36:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 643ad37f2af5c8c674dda90732aa3c3c93368d88
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Thu Aug 7 12:07:45 2014 +0200

    Revert commit 9a41659 (PR 5005) for breaking the loading of certain PDF files in the Firefox addon when range requests are active
---
 src/core/chunked_stream.js | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/core/chunked_stream.js b/src/core/chunked_stream.js
index 5eeb3f0..cf0e6b7 100644
--- a/src/core/chunked_stream.js
+++ b/src/core/chunked_stream.js
@@ -155,15 +155,8 @@ var ChunkedStream = (function ChunkedStreamClosure() {
       if (pos >= this.end) {
         return -1;
       }
-      var byte = this.bytes[pos];
-      if (byte === 0) {
-        // |byte| might be zero, because the corresponding chunk has not been
-        // loaded yet. In this case, this.ensureByte(pos) will throw an
-        // exception and nothing is returned.
-        this.ensureByte(pos);
-      }
-      this.pos++;
-      return byte;
+      this.ensureByte(pos);
+      return this.bytes[this.pos++];
     },
 
     getUint16: function ChunkedStream_getUint16() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list