mozilla/pdf.js — pull request #2390 by nbp (2012-11-16 07:58:52+00:00)
Title: Ensure Type1Parser_extractFontProgram loop counter is not interpreted as a double.

This patch improves pure JavaScript performances by 30% by removing double computations from Type1Parser_extractFontProgram. When parseInt is fed with non numerical values, it returns a NaN which flows into the loop counter which cause every operation to be computed as a double and every index to be trunctated as an int before reading a character. This patch force the NaN value to be coerce as an integer by using a bitwise-or operation with zero.