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

Fix the #savedHasOwnCanvas handling in the StampAnnotation class #19619

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

Snuffleupagus
Copy link
Collaborator

This may not be possible to trigger in practice, however it seems that if StampAnnotation.prototype.mustBeViewedWhenEditing is called back-to-back with isEditing === true set then the second invocation could overwrite the #savedHasOwnCanvas-field and thus lose its initial state.

This may not be possible to trigger in practice, however it seems that if `StampAnnotation.prototype.mustBeViewedWhenEditing` is called back-to-back with `isEditing === true` set then the second invocation could overwrite the `#savedHasOwnCanvas`-field and thus lose its initial state.
@Snuffleupagus
Copy link
Collaborator Author

@calixteman It's very possible that I've completely misunderstood this code, in which case sorry for wasting your time, but to me it appears that there's a potential problem with it.

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.

I'd have said that only this.#savedHasOwnCanvas = this.data.hasOwnCanvas; should be removed.
But I think your implementation is safer, at least in case the value data.hasOwnCanvas is changed for whatever reason.
Since it's pretty hard to test in general, I think the safest solution is the best.

LGTM. Thank you.

@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/93549dd9dd0d911/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/2b60b109bf48673/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/2b60b109bf48673/output.txt

Total script time: 30.72 mins

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

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/3c0068fb55dabf4/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/3c0068fb55dabf4/output.txt

Total script time: 11.85 mins

  • Integration Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/93549dd9dd0d911/output.txt

Total script time: 57.99 mins

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

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

@Snuffleupagus Snuffleupagus merged commit af89e77 into mozilla:master Mar 6, 2025
9 checks passed
@Snuffleupagus
Copy link
Collaborator Author

The Windows ref-tests "failures" are because makeref didn't run (because of a broken bot) after the ICC PR landed the other day.

/botio-windows makeref

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/89fb7cd4596fde7/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/89fb7cd4596fde7/output.txt

Total script time: 29.63 mins

  • Make references: Passed
  • Check references: Passed

@Snuffleupagus Snuffleupagus deleted the fix-#savedHasOwnCanvas branch March 6, 2025 17:30
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.

None yet

3 participants