[webkit-changes] [WebKit/WebKit] 369109: Safari may crash when tapping on video after retur...
Jean-Yves Avenard
noreply at github.com
Mon Jun 5 17:22:37 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 369109ea28ce745bccc5c7bbc578d8228119aa38
https://github.com/WebKit/WebKit/commit/369109ea28ce745bccc5c7bbc578d8228119aa38
Author: Jean-Yves Avenard <jya at apple.com>
Date: 2023-06-05 (Mon, 05 Jun 2023)
Changed paths:
M Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm
M Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm
Log Message:
-----------
Safari may crash when tapping on video after returning to full screen from PiP
https://bugs.webkit.org/show_bug.cgi?id=257651
rdar://109845717
Reviewed by Youenn Fablet.
Temporary fix to get around rdar://110172009. When exiting PiP, the
UIWindow gets deleted while the video view is still a child of it.
As such [videoView window] becomes a dangling pointers and any references
to the old window will cause a crash.
For now, we override the window method of the WKLayerHostView so
that it can detects if the window parent is still alive.
* Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::cleanupFullscreen):
* Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(-[WKLayerHostView willMoveToWindow:]):
(-[WKLayerHostView window]):
(WebKit::VideoFullscreenManagerProxy::returnVideoView):
Canonical link: https://commits.webkit.org/264880@main
More information about the webkit-changes
mailing list