Bug 171365

Summary: Update NetworkStorageSession to support multiple persistent sessions and explicitly set cookie storages
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aestes, annulen, berto, buildbot, cgarcia, commit-queue, danw, gustavo, mcatanzaro, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Brady Eidson 2017-04-26 22:17:20 PDT
Update NetworkStorageSession to support multiple persistent sessions and explicitly set cookie storages

Also a little WK2 NetworkSessionCocoa update based on this.
Comment 1 Brady Eidson 2017-04-26 22:21:19 PDT
Created attachment 308337 [details]
Patch
Comment 2 Brady Eidson 2017-04-27 00:14:23 PDT
Created attachment 308354 [details]
Patch
Comment 3 Brady Eidson 2017-04-27 00:30:46 PDT
Created attachment 308357 [details]
Patch
Comment 4 Alex Christensen 2017-04-27 00:41:19 PDT
Comment on attachment 308354 [details]
Patch

Oh boy
Comment 5 Brady Eidson 2017-04-27 08:57:13 PDT
Created attachment 308395 [details]
Patch
Comment 6 Brady Eidson 2017-04-27 09:01:49 PDT
(In reply to Alex Christensen from comment #4)
> Comment on attachment 308354 [details]
> Patch
> 
> Oh boy

It's on like Donkey Kong.
Comment 7 Andy Estes 2017-04-27 10:17:24 PDT
Comment on attachment 308395 [details]
Patch

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

> Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp:65
> +    auto sharedCookieStorage = adoptCF(_CFHTTPCookieStorageGetDefault(kCFAllocatorDefault));

Over IRC we confirmed that what _CFHTTPCookieStorageGetDefault() returns shouldn't be adopted.

> Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp:72
> +NetworkStorageSession::NetworkStorageSession(SessionID sessionID, RetainPtr<CFURLStorageSessionRef> platformSession, RetainPtr<CFHTTPCookieStorageRef> platformCookieStorage)

These RetainPtrs could probably be rvalue references.
Comment 8 Brady Eidson 2017-04-27 10:41:18 PDT
Created attachment 308407 [details]
Patch
Comment 9 Brady Eidson 2017-04-27 10:41:49 PDT
Will CQ+ after I finish running API tests locally (damn you EWS!)
Comment 10 WebKit Commit Bot 2017-04-27 11:40:08 PDT
Comment on attachment 308407 [details]
Patch

Clearing flags on attachment: 308407

Committed r215883: <http://trac.webkit.org/changeset/215883>
Comment 11 WebKit Commit Bot 2017-04-27 11:40:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Konstantin Tokarev 2017-04-27 11:46:42 PDT
Should SessionID::isEphemeral() be changed now?
Comment 13 Alex Christensen 2017-04-27 11:53:44 PDT
(In reply to Konstantin Tokarev from comment #12)
> Should SessionID::isEphemeral() be changed now?
That'll be done in https://bugs.webkit.org/show_bug.cgi?id=171367
Comment 14 Alex Christensen 2017-04-28 10:16:59 PDT
http://trac.webkit.org/r215928
Comment 15 Radar WebKit Bug Importer 2017-04-28 11:13:44 PDT
<rdar://problem/31891415>