Bug 177644 - Add WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackgroundCPULimit
Summary: Add WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackground...
Status: RESOLVED FIXED
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: 2017-09-28 22:32 PDT by Alex Christensen
Modified: 2017-09-29 14:36 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.08 KB, patch)
2017-09-28 22:33 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (9.30 KB, patch)
2017-09-29 14:28 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2017-09-28 22:32:23 PDT
Add WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackgroundCPULimit
Comment 1 Alex Christensen 2017-09-28 22:33:49 PDT
Created attachment 322168 [details]
Patch
Comment 2 Geoffrey Garen 2017-09-29 11:09:01 PDT
Comment on attachment 322168 [details]
Patch

r=me

I wonder what our strategy is for which things are interfaces on Configuration and which are interfaces on ProcessPool. To some extent, CPU limit is a property of a process.
Comment 3 Alex Christensen 2017-09-29 13:49:08 PDT
If we do something on a ProcessPool we've done it wrong and we should move it to be organized per Page/WKWebView.
Comment 4 Alex Christensen 2017-09-29 13:50:26 PDT
http://trac.webkit.org/r222663
Comment 5 Radar WebKit Bug Importer 2017-09-29 13:50:58 PDT
<rdar://problem/34746705>
Comment 6 mitz 2017-09-29 13:53:40 PDT
Comment on attachment 322168 [details]
Patch

This patch seems wrong. It adds an ivar to WKWebViewConfiguration but doesn’t update -copyWithZone: to copy the value of that ivar.
Comment 7 Geoffrey Garen 2017-09-29 14:10:23 PDT
> If we do something on a ProcessPool we've done it wrong and we should move
> it to be organized per Page/WKWebView.

I don't understand the rationale here.

WKProcessPoolPrivate.h is 97 lines long. Are all 97 lines wrong?
Comment 8 Alex Christensen 2017-09-29 14:15:07 PDT
I'll update the ivar stuff in another patch.

A lot of WKProcessPoolPrivate is wrong. _setCookieAcceptPolicy and _cookieStoragePartitioningEnabled should be associated with a WebsiteDataStore, not a ProcessPool.  _setAllowsSpecificHTTPSCertificate should be associated with a WKWebView, not a ProcessPool.  Downloads are per-NSURLSession, which should be per-WebsiteDataStore, but right now they're ProcessPool global.  etc.
Comment 9 Alex Christensen 2017-09-29 14:28:39 PDT
Reopening to attach new patch.
Comment 10 Alex Christensen 2017-09-29 14:28:40 PDT
Created attachment 322232 [details]
Patch
Comment 11 Alex Christensen 2017-09-29 14:36:20 PDT
http://trac.webkit.org/r222666