[Pkg-javascript-commits] [pdf.js] 26/109: Don't catch `MissingDataException` in `Parser_tryShift`

David Prévot taffit at moszumanska.debian.org
Fri Sep 25 03:04:14 UTC 2015


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

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

commit 8c3b8238ac18ac65d345cc61bd1618f650ad8ffa
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Fri Aug 14 16:25:35 2015 +0200

    Don't catch `MissingDataException` in `Parser_tryShift`
    
    I overlooked this while reviewing PR 6197, but I don't think that we should be catching that particular kind of exception here; hence this patch.
---
 src/core/parser.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/core/parser.js b/src/core/parser.js
index 62a2482..46e3edc 100644
--- a/src/core/parser.js
+++ b/src/core/parser.js
@@ -58,6 +58,9 @@ var Parser = (function ParserClosure() {
         this.shift();
         return true;
       } catch (e) {
+        if (e instanceof MissingDataException) {
+          throw e;
+        }
         // Upon failure, the caller should reset this.lexer.pos to a known good
         // state and call this.shift() twice to reset the buffers.
         return false;

-- 
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