Fix for web worker test in Safari#1849
Conversation
…rowser when the web worker throws an error. See http://www.nczonline.net/blog/2009/08/25/web-workers-errors-and-debugging/
|
/botio-linux lint |
From: Bot.io (Linux)ReceivedCommand cmd_lint from @yurydelendik received. Current queue size: 0 Live output at: http://107.21.233.14:8877/14c05dc01cdbab4/output.txt |
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/14c05dc01cdbab4/output.txt Total script time: 1.17 mins
|
|
Thank you for investigating this. Please address the long lines, illegal tabs and other lint issues. Also, this patch might conflict with #1840. /botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/2dd123771760a8a/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/2dd123771760a8a/output.txt Total script time: 0.43 mins Published |
|
Hmmm i just found out that iPhone / iPad support needs some more love... will look further into that... |
|
pdf.js now is actually working on iOS again. I found out that Uint8array on Safari 5 is lacking the subarray-method and has another issue with Object.defineProperty and DOM objects. This is now fixed and the code is made lint-compliant. |
There was a problem hiding this comment.
Looks like it shall be !/Safari\/5/.test(navigator.userAgent)
There was a problem hiding this comment.
Wow, great catch!
The reason this slipped through is because my iPad seems to be running Safari 6 and that browser is still having the same issue. Fixed it, thanks @yurydelendik
|
/botio-windows lint |
From: Bot.io (Windows)ReceivedCommand cmd_lint from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/257ea6e3d31d34b/output.txt |
|
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://107.21.233.14:8877/fc664b957bebc0c/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/fc664b957bebc0c/output.txt Total script time: 0.26 mins Published |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/257ea6e3d31d34b/output.txt Total script time: 1.19 mins
|
There was a problem hiding this comment.
We should not be looking at the user agent. Use feature detection instead. See https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L599 for inspiration.
There was a problem hiding this comment.
I agree. I've updated the test accordingly... Thanks!
|
/botio-windows lint |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @brendandahl received. Current queue size: 0 Live output at: http://107.21.233.14:8877/87d064919c336a3/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_lint from @brendandahl received. Current queue size: 0 Live output at: http://107.22.172.223:8877/820df6c19fffd51/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/87d064919c336a3/output.txt Total script time: 0.24 mins Published |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/820df6c19fffd51/output.txt Total script time: 1.31 mins
|
…rn value - Minor comment update
|
/botio-windows lint |
1 similar comment
|
/botio-windows lint |
From: Bot.io (Windows)ReceivedCommand cmd_lint from @jviereck received. Current queue size: 0 Live output at: http://107.22.172.223:8877/04043f768493b8a/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @jviereck received. Current queue size: 0 Live output at: http://107.21.233.14:8877/9ce7abdaeeccada/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/9ce7abdaeeccada/output.txt Total script time: 0.24 mins Published |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/04043f768493b8a/output.txt Total script time: 1.23 mins
|
Fix for web worker test in Safari
|
Thank you for the patch |
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 a weird error.
This behaviour is tested by pdf.js while a pdf is being downloaded from a URL. However, 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 workers have not yet been disabled.
This patch fixes this and the issues #1314, #1627, #1643, #1846 and #1805 .