[Pkg-javascript-commits] [pdf.js] 43/109: Add a warning when we encounter an empty stream in `Parser_makeFilter`
David Prévot
taffit at moszumanska.debian.org
Fri Sep 25 03:04:16 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 f814fdc21509984d9fbef3cab46acedfa025747a
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Wed Aug 26 20:07:32 2015 +0200
Add a warning when we encounter an empty stream in `Parser_makeFilter`
Having a warning here would have meant that issue 6360 could have been solved in approximately five minutes, instead of an hour. To avoid that happening again, this patch adds a warning whenever we treat a stream as empty.
---
src/core/parser.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/core/parser.js b/src/core/parser.js
index dbc02e3..a3effae 100644
--- a/src/core/parser.js
+++ b/src/core/parser.js
@@ -525,6 +525,7 @@ var Parser = (function ParserClosure() {
},
makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) {
if (stream.dict.get('Length') === 0 && !maybeLength) {
+ warn('Empty "' + name + '" stream.');
return new NullStream(stream);
}
try {
--
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