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

Change PartialEvaluator.handleColorN to throw when no valid pattern is found #10789

Merged
merged 1 commit into from
May 4, 2019

Conversation

Snuffleupagus
Copy link
Collaborator

Currently handleColorN will fallback to add a completely unparsed/unvalidated operator when no valid pattern was found. This is unfortunate, since it could very easily lead to a couple of different errors:

  • DataCloneErrors when attempting to send the data to the main-thread, e.g. when args is Dict/Stream.
  • Errors in getShadingPatternFromIR on the main-thread, unless args just happens to have the expected format.
  • Errors when actually attempting to render the pattern on the main-thread, since the args will most likely not have the expected format.

Hence it probably makes sense to error in PartialEvaluator.handleColorN, and having invalid patterns fail gracefully via the existing ignoreErrors code-paths instead.

… is found

Currently `handleColorN` will fallback to add a completely unparsed/unvalidated operator when no valid pattern was found. This is unfortunate, since it could very easily lead to a couple of different errors:
 - `DataCloneError`s when attempting to send the data to the main-thread, e.g. when `args` is `Dict`/`Stream`.
 - Errors in `getShadingPatternFromIR` on the main-thread, unless `args` just happens to have the expected format.
 - Errors when actually attempting to render the pattern on the main-thread, since the `args` will most likely not have the expected format.

Hence it probably makes sense to error in `PartialEvaluator.handleColorN`, and having invalid patterns fail gracefully via the existing `ignoreErrors` code-paths instead.
@Snuffleupagus
Copy link
Collaborator Author

/botio lint

@pdfjsbot
Copy link

pdfjsbot commented May 4, 2019

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/d84f870ede0c1be/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 4, 2019

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/856bc9495a3327b/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 4, 2019

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/d84f870ede0c1be/output.txt

Total script time: 0.96 mins

  • Lint: Passed

@pdfjsbot
Copy link

pdfjsbot commented May 4, 2019

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/856bc9495a3327b/output.txt

Total script time: 2.75 mins

  • Lint: Passed

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

pdfjsbot commented May 4, 2019

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/13863c1704a6043/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 4, 2019

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/65a8fb788287230/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 4, 2019

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/13863c1704a6043/output.txt

Total script time: 17.67 mins

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

@pdfjsbot
Copy link

pdfjsbot commented May 4, 2019

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/65a8fb788287230/output.txt

Total script time: 25.57 mins

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

Image differences available at: http://54.215.176.217:8877/65a8fb788287230/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit 6cfb1e1 into mozilla:master May 4, 2019
@timvandermeij
Copy link
Contributor

Makes sense. Thank you!

@Snuffleupagus Snuffleupagus deleted the handleColorN-error branch May 4, 2019 13:31
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.

3 participants