Bug 147635
| Summary: | WKWebsiteDataStore does not always clear cookies | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Shreyas VA <shreyasv> |
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | andersca |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=147333 | ||
Shreyas VA
WKWebsiteDataStore does not clear cookies in the following scenarios:
1) WKWebView has been just created
2) There is no WKWebView attached to the WKWebViewConfiguration
(there maybe more scenarios, these are the known ones)
Sample code to run:
WKWebViewConfiguration* config = [[WKWebViewConfiguration alloc] init];
self.webView =
[[WKWebView alloc] initWithFrame:CGRectZero configuration:config];
[self.view addSubview:self.webView];
NSString* url = @"http://google.com";
[self.webView loadRequest:
[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
// Trigger clearing of cookies.
[self.webView.configuration.websiteDataStore removeDataOfTypes:[NSSet setWithObject:WKWebsiteDataTypeCookies]
modifiedSince:[NSDate distantPast] completionHandler:^{
// Notice that this is not called.
NSLog(@"Cleared cookies");
}];
Expected Results:
The completion handler is called and cookies are cleared.
Actual Results:
The completion handler is not called and cookies are not cleared.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Shreyas VA
rdar://22120241
Anders Carlsson
I can't reproduce this, can you please attach a test app that shows the problem?
Shreyas VA
Reproducibility on simulator
0/5
Reproducibility on device
5/5
Or in other words this bug only affects device builds.
Shreyas VA
I can't repro this bug anymore.
Please note that this is different from bug 147333. This bug also states that the completionHandler is not called.