mozilla/pdf.js — pull request #2318 by init-js (2012-10-28 04:46:41+00:00)
Title: try/catch fallback fails to disable linearization

I've got a bank statement pdf that can't be opened with pdf.js nor the viewer. It gives the warning: "Warning: The linearization data is not available or unreadable pdf data is found", and fails to load.

There is a bug in the linearization getter try/catch, in src/core.js.
Inside the try block for get linearization(), linearization.length could throw an error, but the linearization variable is not reset to false in the catch. Only the warning is emitted.

This is a fix on top of https://github.com/mozilla/pdf.js/pull/1899

Adding the missing line in the catch block fixes rendering for that pdf, for both getDocument, and the web viewer.