One more nit (sorry for not catching this earlier): too much indentation, indent with __two__ spaces.
Also, for future reference, see the style guide: https://github.com/mozilla/pdf.js/wiki/Style-Guide.