Move function creation out of the loop.
Also name the anonymous function. Jslint complains about this.
This commit is contained in:
parent
8cb7c218fd
commit
fb174290c7
9
pdf.js
9
pdf.js
@ -4381,6 +4381,10 @@ var PartialEvaluator = (function partialEvaluator() {
|
||||
var patterns = xref.fetchIfRef(resources.get('Pattern')) || new Dict();
|
||||
var parser = new Parser(new Lexer(stream), false);
|
||||
var args = [], argsArray = [], fnArray = [], obj;
|
||||
var getObjBt = function getObjBt() {
|
||||
parser = this.oldParser;
|
||||
return { name: 'BT' };
|
||||
};
|
||||
|
||||
while (!isEOF(obj = parser.getObj())) {
|
||||
if (isCmd(obj)) {
|
||||
@ -4392,10 +4396,7 @@ var PartialEvaluator = (function partialEvaluator() {
|
||||
fn = OP_MAP[cmd.substr(0, cmd.length - 2)];
|
||||
// feeding 'BT' on next interation
|
||||
parser = {
|
||||
getObj: function() {
|
||||
parser = this.oldParser;
|
||||
return { name: 'BT' };
|
||||
},
|
||||
getObj: getObjBt,
|
||||
oldParser: parser
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user