CRASH in -[WKFullScreenViewController _manager]
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 22:20:15 +0000 (22:20 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 22:20:15 +0000 (22:20 +0000)
commitb9f175c19abd2afb3715aa6bb42c72a0344a6ff7
tree6b7eca63fb860fa60a915a9601ef4bd7ace3c5d7
parent76c492134c1212a97c117bc6428368f23a5e3ba9
CRASH in -[WKFullScreenViewController _manager]
https://bugs.webkit.org/show_bug.cgi?id=185745
<rdar://problem/39195241>

Reviewed by Eric Carlson.

Protect against WKFullScreenViewController outliving WKWebView by making its
_webView property weak. Additionally, add a sanity-check RetainPtr where _webView
is referenced multiple times within a function.

* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController initWithWebView:]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController close]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _isSecure]):
(-[WKFullScreenWindowController _serverTrust]):
(-[WKFullScreenWindowController _updateLocationInfo]):
(-[WKFullScreenWindowController _manager]):
(-[WKFullScreenWindowController _startToDismissFullscreenChanged:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm
Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm