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

Bugfix FXIOS-11034 Avoid non-MT access in closeTab() #24144

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

mattreaganmozilla
Copy link
Collaborator

@mattreaganmozilla mattreaganmozilla commented Jan 14, 2025

📜 Tickets

Partial fix for broader issue mentioned in 11034
#24085

💡 Description

Avoid non-MT access to tabs collection within closeTab. Although the principal function it calls (removeTab) is already @MainActor the getters called beforehand are still problematic, as they can end up reading the tabs array in a background thread while work on the MT may be writing to it.

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

@mattreaganmozilla mattreaganmozilla requested a review from a team as a code owner January 14, 2025 20:32
@mattreaganmozilla
Copy link
Collaborator Author

@dataports @OrlaM LMK if any concerns. It's hard to see how this would cause any complications but I know there's a lot of work happening currently in our tab middlewares.

@mattreaganmozilla
Copy link
Collaborator Author

Also related (another thread issue with tabs): #24028

@mobiletest-ci-bot
Copy link

Messages
📖 Project coverage: 34.17%
📖 Edited 1 files
📖 Created 0 files

Client.app: Coverage: 32.39

File Coverage
TabManagerMiddleware.swift 7.13% ⚠️

Generated by 🚫 Danger Swift against 41ce218

Copy link
Contributor

@dataports dataports left a comment

Choose a reason for hiding this comment

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

Makes sense to me 👍

@mattreaganmozilla mattreaganmozilla merged commit 6dfb43a into mozilla-mobile:main Jan 16, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants