[iOS] Fixing FirstRunChromeSigninViewController leak
FirstRunChromeSigninViewController is being leaked when of all those conditions are true: + it is the delegate of its own presentation controller. + it is shown inside a navigation view controller in second and last position. + the navigation view controller is dismissed with the view controller displayed. Then a retain cycle is created with FirstRunChromeSigninViewController and UIFormSheetPresentationController. This is a bug in iOS, and should not happen. Since FirstRunChromeSigninViewController cannot be swiped to be dismissed, it doesn't need to be the delegate of its presentation controller. The fix is to not set the presentation controller delegate if the view controller is not part of a navigation controller. The fix is done in ChromeSigninViewController since FirstRunChromeSigninViewController is a subclass of if. Apple Feedback: https://feedbackassistant.apple.com/form-response/15480140 Bug: 1004695 Change-Id: I85f7721c4bef1c95d6d30abfd06e4ce83954209f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823198Reviewed-by:Stepan Khapugin <stkhapugin@chromium.org> Commit-Queue: Jérôme Lebel <jlebel@chromium.org> Cr-Commit-Position: refs/heads/master@{#699786}
Showing
Please register or sign in to comment