Bug 177644

Summary: Add WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackgroundCPULimit
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, mitz, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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