Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f6dd331abca3754d4fe18fa43cd33ee38c88fb6d
      
https://github.com/WebKit/WebKit/commit/f6dd331abca3754d4fe18fa43cd33ee38c88fb6d
  Author: Richard Robinson <[email protected]>
  Date:   2025-03-11 (Tue, 11 Mar 2025)

  Changed paths:
    M Source/WebKit/_WebKit_SwiftUI/Implementation/WebViewRepresentable.swift

  Log Message:
  -----------
  [SwiftUI] Re-using the same WebPage for a different WebView after the 
original WebView has been destroyed causes a crash
https://bugs.webkit.org/show_bug.cgi?id=289561
rdar://146719280

Reviewed by Tim Horton and Abrar Rahman Protyasha.

While it is invalid to have multiple visible WebViews using the same WebPage, 
it is perfectly valid for them to use a WebPage one at a time.

To fix this, implement the `dismantle{UI/NS}View` protocol method and inform 
the WebPage that it is no longer bounded to a WebView.

* Source/WebKit/_WebKit_SwiftUI/Implementation/WebViewRepresentable.swift:
(WebViewRepresentable.dismantlePlatformView(_:coordinator:)):
(WebViewRepresentable.dismantleUIView(_:coordinator:)):
(WebViewRepresentable.dismantleNSView(_:coordinator:)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to