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

Fallback to the |Dummy| Pattern when we fail to parse a Shading Pattern (issue 5509) #5516

Merged
merged 1 commit into from
Dec 5, 2014
Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Fixes #5509.

/cc @yurydelendik

case PatternType.TENSOR_PATCH_MESH:
return new Shadings.Mesh(shading, matrix, xref, res);
default:
throw new Error('Unknown PatternType: ' + type);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt this now throwing an unknown pattern type exception, which is catched and ignored a few lines down?
Could this perhaps directly use the dummy shading?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to avoid duplicating the following lines twice (hence why I choose to throw):

  UnsupportedManager.notify(UNSUPPORTED_FEATURES.shadingPattern);
  return new Shadings.Dummy();

The end result is the same, just less repetition. Also, this particular code path shouldn't be very hot in practice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I thought that code de-duplication was the main driver. In general Exeption handlers always look odd. I cannot come up with a better solution, just wanted to mention it.

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Dec 3, 2014

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/090558294e3e453/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 3, 2014

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/9cea194a4db83d6/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 3, 2014

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/090558294e3e453/output.txt

Total script time: 20.49 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Dec 3, 2014

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/9cea194a4db83d6/output.txt

Total script time: 23.90 mins

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

@yurydelendik yurydelendik self-assigned this Dec 5, 2014
@yurydelendik
Copy link
Contributor

/botio makeref

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2014

From: Bot.io (Windows)


Received

Command cmd_makeref from @yurydelendik received. Current queue size: 0

Live output at: http://107.22.172.223:8877/cc0358054549288/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2014

From: Bot.io (Linux)


Received

Command cmd_makeref from @yurydelendik received. Current queue size: 1

Live output at: http://107.21.233.14:8877/37622bdd3f0fa2f/output.txt

@yurydelendik
Copy link
Contributor

Thank you for the patch

yurydelendik added a commit that referenced this pull request Dec 5, 2014
Fallback to the |Dummy| Pattern when we fail to parse a Shading Pattern (issue 5509)
@yurydelendik yurydelendik merged commit 37fe1d1 into mozilla:master Dec 5, 2014
@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2014

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/cc0358054549288/output.txt

Total script time: 20.62 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@Snuffleupagus Snuffleupagus deleted the issue-5509 branch December 5, 2014 16:55
@pdfjsbot
Copy link

pdfjsbot commented Dec 5, 2014

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/37622bdd3f0fa2f/output.txt

Total script time: 23.72 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PDF not displayed properly
4 participants