Bug 188388 - REGRESSION(r225765) WKWebViewConfiguration should not keep a strong reference to a WebPageGroup
Summary: REGRESSION(r225765) WKWebViewConfiguration should not keep a strong reference...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-08-07 13:29 PDT by Alex Christensen
Modified: 2018-08-07 14:21 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.85 KB, patch)
2018-08-07 13:29 PDT, Alex Christensen
achristensen: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.