-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Ensure that we fetch all indirect objects (i.e. |Ref|s) in ColorSpace_parseToIR #6134
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
Ensure that we fetch all indirect objects (i.e. |Ref|s) in ColorSpace_parseToIR #6134
Conversation
…_parseToIR Recently I've landed a number patches which fixed issues with ColorSpaces. In most of these cases the cause of the failures were, either partially or entirely, related to the fact that we didn't resolve indirect objects (i.e. the code was missing `xref.fetchIfRef(...)`). The purpose of this patch is to fix the few remaining cases where indirect objects *could* potentially cause failures. Given that we have seen how this causes failures in practice, I thus think that it makes sense to try and avoid further issues, instead of waiting for users to file even more bugs for this part of the code-base.
@@ -304,7 +304,7 @@ var ColorSpace = (function ColorSpaceClosure() { | |||
} | |||
break; | |||
case 'Pattern': | |||
var basePatternCS = xref.fetchIfRef(cs[1]) || null; |
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.
Note: In this case, xref.fetchIfRef
wasn't actually necessary given https://github.com/mozilla/pdf.js/blob/master/src/core/colorspace.js#L240. The reason that I recently, in PR #6082, added it is simply because I didn't read the code properly.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/6b8a499ff5392d1/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/84de87d3d5ab3c0/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/84de87d3d5ab3c0/output.txt Total script time: 17.93 mins
|
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/6b8a499ff5392d1/output.txt Total script time: 20.12 mins
|
…hIfRef Ensure that we fetch all indirect objects (i.e. |Ref|s) in ColorSpace_parseToIR
Good patch, thank you! |
Recently I've landed a number patches which fixed issues with ColorSpaces. In most of these cases the cause of the failures were, either partially or entirely, related to the fact that we didn't resolve indirect objects (i.e. the code was missing
xref.fetchIfRef(...)
).The purpose of this patch is to fix the few remaining cases where indirect objects could potentially cause failures.
Given that we have seen how this causes failures in practice, I thus think that it makes sense to try and avoid further issues, instead of waiting for users to file even more bugs for this part of the code-base.