Bug 216493 - Move cookie flushing SPI from WKProcessPool to WKHTTPCookieStore
Summary: Move cookie flushing SPI from WKProcessPool to WKHTTPCookieStore
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: 2020-09-14 12:49 PDT by Alex Christensen
Modified: 2020-09-14 14:50 PDT (History)
3 users (show)

See Also:


Attachments
Patch (20.32 KB, patch)
2020-09-14 12:54 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (22.46 KB, patch)
2020-09-14 14:37 PDT, Alex Christensen
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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