mozilla/pdf.js — Issue #770: processorHandler.on relies on JpegImage side-effects
Author: kkujala
Created: 2011-11-05 21:02:52+00:00
State: open

Jslint warns that "Do not use 'new' for side effects"

https://github.com/mozilla/pdf.js/blob/master/src/core.js#L547

In core.js there is a JpegImage creation that is seemingly orphan. It looks like a bug to me. Should the newly created JpegImage be stored somewhere?

processorHandler.on('obj', function pdfDocObj(data) {
var id = data[0];
var type = data[1];

switch (type) {
case 'JpegStream':
var IR = data[2];
new JpegImage(id, IR, this.objs);
break;