Bug 222934 - Adopt new NSURLSessionConfiguration SPI for connection cache configuration
Summary: Adopt new NSURLSessionConfiguration SPI for connection cache configuration
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: Ben Nham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-08 12:45 PST by Ben Nham
Modified: 2021-03-09 14:56 PST (History)
9 users (show)

See Also:


Attachments
Patch (9.22 KB, patch)
2021-03-08 12:55 PST, Ben Nham
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (9.29 KB, patch)
2021-03-08 13:26 PST, Ben Nham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Nham 2021-03-08 12:45:21 PST
Adopt new NSURLSessionConfiguration SPI for connection cache configuration
Comment 1 Ben Nham 2021-03-08 12:55:27 PST
Created attachment 422604 [details]
Patch
Comment 2 Ben Nham 2021-03-08 13:26:40 PST
Created attachment 422611 [details]
Patch
Comment 3 Radar WebKit Bug Importer 2021-03-09 08:41:46 PST
<rdar://problem/75218970>
Comment 4 Sam Weinig 2021-03-09 08:55:35 PST
Comment on attachment 422611 [details]
Patch

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

> Source/WebCore/platform/network/cf/ResourceRequestCFNet.h:51
> +    case 0:

Does CFNetwork define these values in constants anywhere?
Comment 5 Ben Nham 2021-03-09 09:05:00 PST
(In reply to Sam Weinig from comment #4)
> Comment on attachment 422611 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=422611&action=review
> 
> > Source/WebCore/platform/network/cf/ResourceRequestCFNet.h:51
> > +    case 0:
> 
> Does CFNetwork define these values in constants anywhere?

No, the user just assigns an arbitrary integer value in the range [0, _connectionCacheNumPriorityLevels) as they please. So basically this SPI allows us to map our five WebKit resource priority levels into five CFNetwork request priority levels. Previously we were mapping our five resource priority levels into four CFNetwork request priority levels to work around the bug described in https://bugs.webkit.org/show_bug.cgi?id=203423.

Also note that this SPI only affects HTTP/1.1 requests. There is a separate path for setting HTTP/2 stream priorities that is actually an API which we already use elsewhere (-[NSURLSessionTask priority]).
Comment 6 Geoffrey Garen 2021-03-09 09:27:01 PST
Comment on attachment 422611 [details]
Patch

r=me
Comment 7 EWS 2021-03-09 11:08:41 PST
Committed r274161: <https://commits.webkit.org/r274161>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422611 [details].