[Webkit-unassigned] [Bug 282079] New: WKWebsiteDataStore and WKHTTPCookieStore asynchronous functions do not include error information

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 24 20:31:35 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=282079

            Bug ID: 282079
           Summary: WKWebsiteDataStore and WKHTTPCookieStore asynchronous
                    functions do not include error information
           Product: WebKit
           Version: Other
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit API
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: 246g2wr4 at duck.com

Background:

WKWebsiteDataStore[1] has a `removeData(ofTypes:for:completionHandler:)` function which is used for removing data from the data store. This function uses an asynchronous callback to tell the caller when it has completed, which has no arguments.

We have an app which uses this API to clear the user's web browsing data. We have found that in rare situations (not consistently reproducible) the removeData call fails to remove some types of data, leaving the user signed into some of their websites. In this case it appears that removeData is failing to remove data, but the API doesn't report an error - it would be ideal if it were to provide the caller with some error information, so that some recovery logic can be implemented.

The same problem applies to the `delete(_:completionHandler:)` and `setCookie(_:completionHandler:)` functions of WKHTTPCookieStore[2].

Objective:

Add error information to the completion handlers of WKWebsiteDataStore and WKHTTPCookieStore.

The relevant APIs are:

WKWebsiteDataStore's `removeData(ofTypes:for:completionHandler:)` function
WKHTTPCookieStore's `delete(_:completionHandler:)` function
WKHTTPCookieStore's `setCookie(_:completionHandler:)` function

[1]: https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532936-removedata
[2]: https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882009-delete

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241025/e91b3cd3/attachment-0001.htm>


More information about the webkit-unassigned mailing list