Bug 258051

Summary: Stop autoreleasing WKWebView and WKContentView in WebKit::PageClientImplIOS
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit Misc.Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 257938    
Bug Blocks:    

David Kilzer (:ddkilzer)
Reported 2023-06-13 16:28:36 PDT
Stop autoreleasing WKWebView and WKContentView in WebKit::PageClientImplIOS. Since both m_webView and m_contentView are WeakObjCPtr<> instance variables, calling methods like `[m_webView bar]` results in autoreleasing `m_webView` every time. Fix this by using convenience methods that call WeakObjCPtr<>::get() and return a RetainPtr<> instead.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-06-13 16:29:00 PDT
David Kilzer (:ddkilzer)
Comment 2 2023-06-13 16:35:39 PDT
EWS
Comment 3 2023-06-14 11:24:17 PDT
Committed 265157@main (3fe8f3b95be5): <https://commits.webkit.org/265157@main> Reviewed commits have been landed. Closing PR #14938 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.