Skip to content
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

Merged
merged 1 commit into from Jun 22, 2015
Merged

Ensure that we fetch all indirect objects (i.e. |Ref|s) in ColorSpace_parseToIR #6134

merged 1 commit into from Jun 22, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

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.

…_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;
Copy link
Collaborator Author

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.

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/6b8a499ff5392d1/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/84de87d3d5ab3c0/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/84de87d3d5ab3c0/output.txt

Total script time: 17.93 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/6b8a499ff5392d1/output.txt

Total script time: 20.12 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

timvandermeij added a commit that referenced this pull request Jun 22, 2015
…hIfRef

Ensure that we fetch all indirect objects (i.e. |Ref|s) in ColorSpace_parseToIR
@timvandermeij timvandermeij merged commit d504cde into mozilla:master Jun 22, 2015
@timvandermeij
Copy link
Contributor

Good patch, thank you!

@Snuffleupagus Snuffleupagus deleted the ColorSpace-parseToIR-fetchIfRef branch June 22, 2015 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants