-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change src/core/jpg.js
to use the error
utility function instead of throw
ing
#7591
Conversation
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/b70804968c25b57/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/8998885e69eedf0/output.txt |
Please note: I pushed a new version of the patch that only removed a superfluous newline at the top of the file. Obviously I didn't see this until I had already triggered testing :-( |
From: Bot.io (Windows)FailedFull output at http://107.22.172.223:8877/8998885e69eedf0/output.txt Total script time: 24.04 mins
Image differences available at: http://107.22.172.223:8877/8998885e69eedf0/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/b70804968c25b57/output.txt Total script time: 29.24 mins
Image differences available at: http://107.21.233.14:8877/b70804968c25b57/reftest-analyzer.html#web=eq.log |
jpegImage.decodeTransform = transform; | ||
var jpegImage = new JpegImage(); | ||
|
||
// Checking if values needs to be transformed before conversion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: need to be transformed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this comment was pre-existing, I only capitalized the first letter and added a period at the end, but somehow I didn't notice the other grammatical issue here.
Fixed now, thanks for spotting this!
Looks good, but after #7407 lands this needs to be adjusted to convert the newly introduced |
This now needs an update to include the change from the PR mentioned above. |
…of `throw`ing This allows us to remove the `try/catch` statements used in `src/core/stream.js` when parsing JPEG images. As far as I can tell, the only reason for the current usage of plain `throw` is that `jpg.js` originally was external code. Given that this code now lives in our repo, this patch brings the JPEG code more in line with e.g. `src/core/jpx.js` and `src/core/jbig2.js`.
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/35173d8fe8dff19/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/35173d8fe8dff19/output.txt Total script time: 1.22 mins Published |
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/026faa12c4b7b0d/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/18e9efb01923a67/output.txt |
From: Bot.io (Windows)FailedFull output at http://107.22.172.223:8877/026faa12c4b7b0d/output.txt Total script time: 23.82 mins
Image differences available at: http://107.22.172.223:8877/026faa12c4b7b0d/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/18e9efb01923a67/output.txt Total script time: 39.02 mins
Image differences available at: http://107.21.233.14:8877/18e9efb01923a67/reftest-analyzer.html#web=eq.log |
Good to have this, thank you! |
This allows us to remove the
try/catch
statements used insrc/core/stream.js
when parsing JPEG images.As far as I can tell, the only reason for the current usage of plain
throw
is thatjpg.js
originally was external code. Given that this code now lives in our repo, this patch brings the JPEG code more in line with e.g.src/core/jpx.js
andsrc/core/jbig2.js
.Edit: Easier reviewing with https://github.com/mozilla/pdf.js/pull/7591/files?w=1.