Closed Bug 1538604 Opened 6 years ago Closed 6 years ago

Beta 16 Crash installing long press gesture handler

Categories

(Firefox for iOS :: General, enhancement)

Other
iOS
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios ? ---

People

(Reporter: garvan, Assigned: garvan)

Details

Attachments

(1 file)

118.31 KB, application/octet-stream
Details
Attached file crash-report

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

Assignee: nobody → gkeeley

Landed on master, followup by watching for any crashes in the next 16 Beta.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: