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

Simplify the PDFDocument constructor #14648

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

Snuffleupagus
Copy link
Collaborator

Originally the code in the src/-folder was shared between the main/worker-threads, and back then it probably made sense that the PDFDocument constructor accepted different arguments.
However, for many years we've not been passing anything except Streams to PDFDocument and we should thus be able to slightly simplify that code. Note that for e.g. unit-tests of this code, using either a NullStream or a StringStream works just fine.

Originally the code in the `src/`-folder was shared between the main/worker-threads, and back then it probably made sense that the `PDFDocument` constructor accepted different arguments.
However, for many years we've not been passing anything *except* Streams to `PDFDocument` and we should thus be able to slightly simplify that code. Note that for e.g. unit-tests of this code, using either a `NullStream` or a `StringStream` works just fine.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Mar 8, 2022

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/d8c7ddbfbbb26ba/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 8, 2022

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/d5780fa67b6c948/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 8, 2022

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/d5780fa67b6c948/output.txt

Total script time: 23.42 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 4
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/d5780fa67b6c948/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Mar 8, 2022

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/d8c7ddbfbbb26ba/output.txt

Total script time: 26.05 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: Passed

@timvandermeij timvandermeij merged commit 55a931e into mozilla:master Mar 9, 2022
@timvandermeij
Copy link
Contributor

Makes sense; thanks!

@Snuffleupagus Snuffleupagus deleted the PDFDocument-stream branch March 10, 2022 08:48
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