Bug 213636

Summary: WKHTTPCookieStore.setCookie should flush the cookies to disk before calling completion handler when we are using the UIProcess's default cookie storage
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Alex Christensen 2020-06-25 20:58:59 PDT
WKHTTPCookieStore.setCookie should flush the cookies to disk before calling completion handler when we are using the UIProcess's default cookie storage
Comment 1 Alex Christensen 2020-06-25 20:59:53 PDT
Created attachment 402847 [details]
Patch
Comment 2 EWS 2020-06-25 21:36:24 PDT
Committed r263551: <https://trac.webkit.org/changeset/263551>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402847 [details].
Comment 3 Radar WebKit Bug Importer 2020-06-25 21:37:13 PDT
<rdar://problem/64789854>
Comment 4 Alex Christensen 2020-08-14 18:04:42 PDT
Comment on attachment 402847 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm:42
> +    ASSERT(RunLoop::isMain());
> +    [[NSHTTPCookieStorage sharedHTTPCookieStorage] _saveCookies:makeBlockPtr([completionHandler = WTFMove(completionHandler)]() mutable {

This being on the main thread caused hangs which I believe were resolved with http://trac.webkit.org/r264613
Comment 5 Alex Christensen 2020-08-14 18:44:23 PDT
Reverting in https://bugs.webkit.org/show_bug.cgi?id=215530