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

A couple of small scripting/XFA-related tweaks in the worker-code #13254

Merged
merged 1 commit into from Apr 17, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Apr 17, 2021

  • Use PDFManager.ensureDoc, rather than PDFManager.ensure, in a couple of spots in the code. If there exists a short-hand format, we should obviously use it wherever possible.

  • Fix a unit-test helper, to account for the previous changes. (Also, converts a function to be async instead.)

  • Add one more exists-check in PDFDocument.loadXfaFonts, which I missed to suggest in PR 13146, to prevent any future errors if the method is ever called in a situation where it shouldn't be.
    Also, print a warning if the actual font-loading fails since that could help future debugging. (Finally, reduce overall indentation in the loop.)

  • Slightly unrelated, but make a small tweak of a comment in src/core/fonts.js to reduce possible confusion.

Slightly smaller/simpler diff with https://github.com/mozilla/pdf.js/pull/13254/files?w=1

 - Use `PDFManager.ensureDoc`, rather than `PDFManager.ensure`, in a couple of spots in the code. If there exists a short-hand format, we should obviously use it whenever possible.

 - Fix a unit-test helper, to account for the previous changes. (Also, converts a function to be `async` instead.)

 - Add one more exists-check in `PDFDocument.loadXfaFonts`, which I missed to suggest in PR 13146, to prevent any possible errors if the method is ever called in a situation where it shouldn't be.
   Also, print a warning if the actual font-loading fails since that could help future debugging. (Finally, reduce overall indentation in the loop.)

 - Slightly unrelated, but make a small tweak of a comment in `src/core/fonts.js` to reduce possible confusion.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/9c8b6b7762d10a7/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/660ac80b36a0ce0/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/9c8b6b7762d10a7/output.txt

Total script time: 25.90 mins

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

Image differences available at: http://54.67.70.0:8877/9c8b6b7762d10a7/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/660ac80b36a0ce0/output.txt

Total script time: 28.54 mins

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

Image differences available at: http://3.101.106.178:8877/660ac80b36a0ce0/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit dd7f04e into mozilla:master Apr 17, 2021
@timvandermeij
Copy link
Contributor

Looks good!

@Snuffleupagus Snuffleupagus deleted the scripting-misc-fixes branch April 17, 2021 10:36
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