Beta 16 Crash installing long press gesture handler
Categories
(Firefox for iOS :: General, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
fxios | ? | --- |
People
(Reporter: garvan, Assigned: garvan)
Details
Attachments
(1 file)
118.31 KB,
application/octet-stream
|
Details |
The nature of the crash is unclear from the crash reports, however the code for this has an obvious bug that it retains the WKContentView.CALayer.
While it should be safe to KVO-observe using the new Swift 4 KVO syntax which manages uninstalling observers when an observed object is destroyed (1), it is very unlikely to be safe to retain that internal object.
(1) https://developer.apple.com/library/archive/releasenotes/Foundation/RN-Foundation/index.html
Alternative Approach_
Avoid WKContentView.layer.bounds KVO, and simply try to install the gesture handler on a variety of WebView events such as progress, url change, and selected tab changed.
The alternative approach of avoiding WKContentView.layer.bounds KVO is my preferred solution:
https://github.com/mozilla-mobile/firefox-ios/pull/4645
Landed on master, followup by watching for any crashes in the next 16 Beta.
Description
•