[webkit-reviews] review denied: [Bug 208365] UIProcess crash after using _prepareForMoveToWindow, then deallocating the WKWebView before moving to the window : [Attachment 392426] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 5 17:03:06 PST 2020


Geoffrey Garen <ggaren at apple.com> has denied Sihui Liu <sihui_liu at apple.com>'s
request for review:
Bug 208365: UIProcess crash after using _prepareForMoveToWindow, then
deallocating the WKWebView before moving to the window
https://bugs.webkit.org/show_bug.cgi?id=208365

Attachment 392426: Patch

https://bugs.webkit.org/attachment.cgi?id=392426&action=review




--- Comment #17 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 392426
  --> https://bugs.webkit.org/attachment.cgi?id=392426
Patch

As Sihui explained in person, the API test failure indicates a retain cycle --
the cycle happens when you move to the window.

Tim and Sihui and I think this solution might work:

WebViewImpl::m_targetWindowForMovePreparation becomes a RetainPtr

	WebViewImpl::prepareForMoveToWindow does not clear
m_targetWindowForMovePreparation after calling completion handler

	WebViewImpl::viewWillMoveToWindow: copy to
WebViewImpl::viewWillMoveToWindowImpl

	WebViewImpl::viewWillMoveToWindow: calls viewWillMoveToWindowImpl and
then clear m_targetWindowForMovePreparation

	WebViewImpl::viewDidMoveToWindow: copy to
WebViewImpl::viewDidMoveToWindowImpl

	WebViewImpl::viewDidMoveToWindow: call
WebViewImpl::viewDidMoveToWindowImpl

	WebViewImpl::prepareForMoveToWindow: call
WebViewImpl::viewWillMoveToWindowImpl & WebViewImpl::viewDidMoveToWindowImpl


More information about the webkit-reviews mailing list