Skip to content

Convert TranslatedFont.prototype.loadType3Data to an asynchronous method - #21719

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:loadType3Data-async
Aug 6, 2026
Merged

Convert TranslatedFont.prototype.loadType3Data to an asynchronous method#21719
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:loadType3Data-async

Conversation

@Snuffleupagus

@Snuffleupagus Snuffleupagus commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

The Type3 glyphs are parsed in series, which was implemented by chaining the getOperatorList promises together one after another.
Thanks to modern JavaScript this can be simplified a little bit, since we can just await within the loop instead.


Smaller diff with https://github.com/mozilla/pdf.js/pull/21719/changes?w=1

…ethod

The Type3 glyphs are parsed in series, which was implemented by chaining the `getOperatorList` promises together one after another.
Thanks to modern JavaScript this can be simplified a little bit, since we can just `await` within the loop instead.
@codecov-commenter

codecov-commenter commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (5f181fd) to head (74fe316).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21719      +/-   ##
==========================================
+ Coverage   90.03%   90.05%   +0.01%     
==========================================
  Files         264      264              
  Lines       66939    66936       -3     
==========================================
+ Hits        60267    60277      +10     
+ Misses       6672     6659      -13     
Flag Coverage Δ
browsertest 66.47% <100.00%> (-0.03%) ⬇️
fonttest 9.03% <ø> (ø)
integrationtest 69.36% <0.00%> (+0.01%) ⬆️
unittest 57.97% <85.18%> (+<0.01%) ⬆️
unittestcli 56.71% <85.18%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Snuffleupagus

Copy link
Copy Markdown
Collaborator Author

/botio browsertest

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

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

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

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/7c809e3caa4db3d/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 16.65 mins

  • Regression tests: Passed

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/7c809e3caa4db3d/output.txt

Total script time: 23.41 mins

  • Regression tests: Passed

@timvandermeij
timvandermeij merged commit f43ce86 into mozilla:master Aug 6, 2026
21 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Thank you for simplifying this a bit!

@Snuffleupagus
Snuffleupagus deleted the loadType3Data-async branch August 6, 2026 20:52
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.

4 participants