Bug 188388

Summary: REGRESSION(r225765) WKWebViewConfiguration should not keep a strong reference to a WebPageGroup
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED INVALID    
Severity: Normal CC: cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch achristensen: review-

Description Alex Christensen 2018-08-07 13:29:00 PDT
REGRESSION(r225765) WKWebViewConfiguration should not keep a strong reference to a WebPageGroup
Comment 1 Alex Christensen 2018-08-07 13:29:55 PDT
Created attachment 346726 [details]
Patch
Comment 2 Alex Christensen 2018-08-07 13:29:57 PDT
<rdar://problem/42788651>
Comment 3 Chris Dumez 2018-08-07 13:41:41 PDT
Comment on attachment 346726 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=346726&action=review

> Source/WebKit/ChangeLog:9
> +        Doing so caused a reference cycle.  Keep an identifier instead.

I do not get why this is OK. In particular in this scenario:
1. I create a WKPageGroup
2. I create a WKWebViewConfiguration
3. I set my WKPageGroup on the WKWebViewConfiguration
4. I deref the WKPageGroup since I expect the WKWebViewConfiguration to hold on to it. -> after your change, the WKPageGroup gets destroyed right?
5. I create a WKWebView using my WKWebViewConfiguration

-> It does not end up in the WKPageGroup I specified.
Comment 4 Alex Christensen 2018-08-07 14:21:03 PDT
Comment on attachment 346726 [details]
Patch

Chris is right.  This is no good.