Bug 210235

Summary: Cookies still exist after data removal of WKWebsiteDataStore
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: WebKit2Assignee: Sihui Liu <sihui_liu>
Status: NEW    
Severity: Normal CC: achristensen
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch achristensen: review-

Sihui Liu
Reported 2020-04-08 18:41:42 PDT
Reproducible steps: 1. Store some cookies on disk(can be done and verified with WKHTTPCookieStore's API), then quit app (make sure no cookie storage in memory). 2. Remove all data of default session with WKWebsiteDataStore's removeDataOfTypes. 3. Get cookies with WKHTTPCookieStore's API. The cookies count is not zero. The problem is that UI process and network process are accessing the same cookie storage file. Cookie removal of step 2 is done in the network process and cookie retrieval of step 3 is done in the UI process (because there is no processpool). UI process may read the cookie storage file into memory before data removal of step 2, and not update in-memory storage properly.
Attachments
Patch (5.24 KB, patch)
2020-04-08 18:53 PDT, Sihui Liu
achristensen: review-
Sihui Liu
Comment 1 2020-04-08 18:53:22 PDT
Alex Christensen
Comment 2 2020-04-09 10:15:09 PDT
Comment on attachment 395899 [details] Patch An extra flush won't hurt. Eventually https://bugs.webkit.org/show_bug.cgi?id=203547 will really fix this.
Alexey Proskuryakov
Comment 3 2020-04-09 16:22:42 PDT
iOS API test failures seem related.
Alex Christensen
Comment 4 2020-04-09 17:18:35 PDT
Comment on attachment 395899 [details] Patch definitely
Note You need to log in before you can comment on or make changes to this bug.