mozilla/pdf.js — pull request #1849 by Reggino (2012-06-26 21:25:05+00:00)
Title: Fixing web worker test for Safari

Safari can not read or write typed arrays to 'web workers'. This will cause Safari on the iPhone and iPad to crash. The desktop version of Safari just throws an Error due the fact that the typed array (in this case Uint8Array) has been stripped down to an incomplete 'regular' object.

This behaviour is tested by pdf.js while a pdf is being downloaded from a URL. However, in sometimes the pdf has finished downloading BEFORE the web worker-test has finished! In that case the rendering of the final pdf would cause errors, because the web worker has not YET been disabled.

This patch fixes this and the issues #1314, #1627, #1643, #1846 and #1805 .