[webkit-changes] [WebKit/WebKit] 48d3c2: [iOS] Crash in -_willMoveToWindow after entering PiP

Jer Noble noreply at github.com
Sat Jan 27 06:52:52 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 48d3c2ac38ae8d10e608760a8e2043d293e5d80b
      https://github.com/WebKit/WebKit/commit/48d3c2ac38ae8d10e608760a8e2043d293e5d80b
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2024-01-27 (Sat, 27 Jan 2024)

  Changed paths:
    M Source/WebCore/platform/cocoa/WebAVPlayerLayerView.mm

  Log Message:
  -----------
  [iOS] Crash in -_willMoveToWindow after entering PiP
https://bugs.webkit.org/show_bug.cgi?id=268192
rdar://110172009

Reviewed by Eric Carlson and Wenson Hsieh.

When reparenting the video view between two WKAVPlayerLayerViews, WebKit was previously
re-parenting only the CALayer children of each view. This led to a stale pointer to those
views' UIWindows, causing a UIKit runtime assertion during view teardown.

Instead, reparent the UIViews directly instead of their children, which does the correct
internal-to-UIView ivar cleanup.

* Source/WebCore/platform/cocoa/WebAVPlayerLayerView.mm:
(WebCore::WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
(WebCore::WebAVPlayerLayerView_stopRoutingVideoToPictureInPicturePlayerLayerView):

Canonical link: https://commits.webkit.org/273605@main




More information about the webkit-changes mailing list