Bugfix FXIOS-8416 [v124] Fix potential KVO crash if BVC is dellocated before unregistering
:scroll: Tickets
:bulb: Description
This is a fix to avoid potential crashes in WebKit if the BVC or its scrollController are deallocated without de-registering them as observers of the WKWebView or its scroll view.
(Related discussion thread: https://mozilla.slack.com/archives/C05C9RET70F/p1707832410945339 )
:pencil: Checklist
You have to check all boxes before merging
- [x] Filled in the above information (tickets numbers and description of your work)
- [x] 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
Going to open as a draft, this is ready for review but I'd like to do one additional round of testing before merging.
| Messages | |
|---|---|
| :book: | Project coverage: 33.49% |
| :book: | Edited 3 files |
| :book: | Created 0 files |
Client.app: Coverage: 32.28
| File | Coverage | |
|---|---|---|
| BrowserViewController.swift | 21.21% | ⚠️ |
| TabScrollController.swift | 70.17% | ✅ |
Generated by :no_entry_sign: Danger Swift against 80deea772284327b6d1b47e3719c6b34e205945d
This was intended to target v124 (was merged 2/20) but it looks like these changes never made it into release/v124.
Because these changes are needed for my latest follow-up fix (https://github.com/mozilla-mobile/firefox-ios/pull/19211) targeting weekly, I'm planning to backport this PR to v124 branch for the weekly.
If anyone has concerns about this please LMK. Thank you cc @dsmithpadilla @OrlaM @lmarceau
@mergifyio backport release/v124
backport release/v124
✅ Backports have been created
- #19215 Bugfix FXIOS-8416 [v124] Fix potential KVO crash if BVC is dellocated before unregistering (backport #18735) has been created for branch
release/v124