Skip to content

Assert that numberToString is called with a number (issue 19877) #19880

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

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

NOTE: Given that this is an internal function, used only in the worker-thread, it's not clear to me that this is an entirely "necessary" change.

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/2cc5edec377f77c/output.txt

@moz-tools-bot
Copy link
Collaborator

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/df12c197946101f/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

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

Total script time: 30.87 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 767

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/2cc5edec377f77c/output.txt

Total script time: 60.89 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 764

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

@Snuffleupagus
Copy link
Collaborator Author

/botio browsertest

@moz-tools-bot
Copy link
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/c00e2eef66c6ad2/output.txt

@moz-tools-bot
Copy link
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/c418c07b3321821/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 16.01 mins

  • Regression tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

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

Total script time: 26.58 mins

  • Regression tests: Passed

@Snuffleupagus
Copy link
Collaborator Author

@calixteman We could obviously just WONTFIX the issue instead, if you think that this change is unnecessary.

@calixteman
Copy link
Contributor

I'd say this patch is useless especially because as you mentioned it's completely under our control and not exposed.
I'd have say something different if the user would have been able to provide a test case.
Anyway, if we're able to strip out the assertion when building for m-c, I'm not opposed to this patch.

@Snuffleupagus Snuffleupagus force-pushed the numberToString-assert-number branch from d02121d to 98a5cc4 Compare April 29, 2025 15:37
@Snuffleupagus
Copy link
Collaborator Author

Anyway, if we're able to strip out the assertion when building for m-c, I'm not opposed to this patch.

Sure, I've updated the patch to limit this code to development and TESTING modes.

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@Snuffleupagus Snuffleupagus marked this pull request as draft April 29, 2025 18:30
@Snuffleupagus Snuffleupagus marked this pull request as ready for review April 29, 2025 18:31
*NOTE:* Given that this is an *internal* function, used only in the worker-thread, it's not clear to me that this is an entirely "necessary" change.
@Snuffleupagus Snuffleupagus force-pushed the numberToString-assert-number branch from 98a5cc4 to f5faf86 Compare April 29, 2025 18:31
@Snuffleupagus
Copy link
Collaborator Author

(The GitHub Actions were "stuck", not showing any results, so re-pushing this without any code changes to try and fix that.)

@Snuffleupagus Snuffleupagus merged commit 0922aa9 into mozilla:master Apr 29, 2025
9 checks passed
@Snuffleupagus Snuffleupagus deleted the numberToString-assert-number branch April 29, 2025 18:35
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.

[Bug]: numberToString function doesn't properly handle null values in pdf.js/src/core/core_utils.js
3 participants