Bug 216493

Summary: Move cookie flushing SPI from WKProcessPool to WKHTTPCookieStore
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch cdumez: review+

Description Alex Christensen 2020-09-14 12:49:27 PDT
Move cookie flushing SPI from WKProcessPool to WKHTTPCookieStore
Comment 1 Alex Christensen 2020-09-14 12:54:04 PDT
Created attachment 408737 [details]
Patch
Comment 2 Alex Christensen 2020-09-14 12:54:07 PDT
<rdar://problem/68749055>
Comment 3 Alex Christensen 2020-09-14 13:45:04 PDT
Comment on attachment 408737 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStorePrivate.h:30
>  - (void)_setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy completionHandler:(void (^)())completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));

This also needs a void inside the () to be able to be compiled from ObjC (not ObjC++).  I'll add when committing this.
Comment 4 Alex Christensen 2020-09-14 13:50:56 PDT
Comment on attachment 408737 [details]
Patch

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

> Source/WebKit/ChangeLog:11
> +        rdar://problem/68749055 tracks adoption in Safari, which I will land within an hour of landing this to avoid cookie regressions.

rdar://problem/68872711 is the correct radar.  Will fix before landing.
Comment 5 Chris Dumez 2020-09-14 14:14:46 PDT
Comment on attachment 408737 [details]
Patch

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

> Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm:228
> +    platformSyncAllCookies(WTFMove(completionHandler));

Since this is now on the HTTPCookieStore (which is associated with a single data store AFAIK), don't we want to sync cookies for the cookie store 's session only instead of doing it for ALL sessions?
Comment 6 Alex Christensen 2020-09-14 14:37:28 PDT
Created attachment 408746 [details]
Patch
Comment 7 Alex Christensen 2020-09-14 14:50:51 PDT
http://trac.webkit.org/r267042