Skip to content

Avoid bundling DOM-related code in the built pdf.worker.mjs file#21269

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:WORKER_THREAD-define
May 14, 2026
Merged

Avoid bundling DOM-related code in the built pdf.worker.mjs file#21269
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:WORKER_THREAD-define

Conversation

@Snuffleupagus
Copy link
Copy Markdown
Collaborator

Currently the isCanvasFilterSupported/isAlphaColorInputSupported getters, on the FeatureTest class, contains code that cannot run in the worker-thread since it relies on the DOM being available.
To avoid that a new DEFINE is added, in gulpfile.mjs, to allow skipping this sort of dead code in the built pdf.worker.mjs file.

Currently the `isCanvasFilterSupported`/`isAlphaColorInputSupported` getters, on the `FeatureTest` class, contains code that cannot run in the worker-thread since it relies on the DOM being available.
To avoid that a new DEFINE is added, in `gulpfile.mjs`, to allow skipping this sort of dead code in the built `pdf.worker.mjs` file.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 14, 2026

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.17%. Comparing base (bf9ae76) to head (204f920).

Files with missing lines Patch % Lines
src/shared/util.js 14.28% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21269      +/-   ##
==========================================
+ Coverage   54.70%   56.17%   +1.46%     
==========================================
  Files         216      220       +4     
  Lines       59131    59234     +103     
==========================================
+ Hits        32347    33274     +927     
+ Misses      26784    25960     -824     
Flag Coverage Δ
fonttest 8.64% <0.00%> (?)
unittest 55.45% <0.00%> (?)
unittestcli 54.70% <14.28%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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/94964f75c1f8b4f/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/7b8a6eb374a2e50/output.txt

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/94964f75c1f8b4f/output.txt

Total script time: 18.30 mins

  • Regression tests: FAILED
  different ref/snapshot: 1

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

Copy link
Copy Markdown
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

r=me; thank you for improving this!

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Failed

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

Total script time: 24.53 mins

  • Regression tests: FAILED
  different ref/snapshot: 1

Image differences available at: http://54.193.163.58:8877/7b8a6eb374a2e50/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit 71e9eb2 into mozilla:master May 14, 2026
21 of 22 checks passed
@Snuffleupagus Snuffleupagus deleted the WORKER_THREAD-define branch May 14, 2026 11:51
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.

4 participants