Skip to content
Permalink
Browse files
[iOS] MobileSafari crashes at WebCore: WebCore::VideoFullscreenInterf…
…aceAVKit::doEnterFullscreen

https://bugs.webkit.org/show_bug.cgi?id=221863
<rdar://73861140>

Patch by Jean-Yves Avenard <jya@apple.com> on 2021-02-14
Reviewed by Darin Adler.

On iPad, it's possible for AVKit to fail due to racing requests to exit full screen and enter full screen. The enterFullscreenHandler would attempt to immediately re-enter full screen.
For now we bail-out early to avoid the crash. In a follow-up patch we will ensure that the condition to enter fullscreen while there's a pending operation to exit fullscreen can't occur.
No new tests, can't reproduce. Analysis has been entirely theoretical.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
Exit early if error returned.

Canonical link: https://commits.webkit.org/234077@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
jyavenard authored and webkit-commit-queue committed Feb 14, 2021
1 parent 6a31b61 commit da505d27b39f4a2f0e63d71ca3ec4280777433c0
Showing 2 changed files with 20 additions and 1 deletion.
@@ -1,3 +1,19 @@
2021-02-14 Jean-Yves Avenard <jya@apple.com>

[iOS] MobileSafari crashes at WebCore: WebCore::VideoFullscreenInterfaceAVKit::doEnterFullscreen
https://bugs.webkit.org/show_bug.cgi?id=221863
<rdar://73861140>

Reviewed by Darin Adler.

On iPad, it's possible for AVKit to fail due to racing requests to exit full screen and enter full screen. The enterFullscreenHandler would attempt to immediately re-enter full screen.
For now we bail-out early to avoid the crash. In a follow-up patch we will ensure that the condition to enter fullscreen while there's a pending operation to exit fullscreen can't occur.
No new tests, can't reproduce. Analysis has been entirely theoretical.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
Exit early if error returned.

2021-02-13 Darin Adler <darin@apple.com>

Crash calling replaceTrack on a sender that outlives its RTCPeerConnection
@@ -1576,8 +1576,11 @@ - (void)removeFromParentViewController

void VideoFullscreenInterfaceAVKit::enterFullscreenHandler(BOOL success, NSError* error)
{
if (!success)
if (!success) {
WTFLogAlways("-[AVPlayerViewController enterFullScreenAnimated:completionHandler:] failed with error %s", [[error localizedDescription] UTF8String]);
ASSERT_NOT_REACHED();
return;
}

LOG(Fullscreen, "VideoFullscreenInterfaceAVKit::enterFullscreenStandard - lambda(%p)", this);
if (!m_standby) {

0 comments on commit da505d2

Please sign in to comment.