[webkit-reviews] review granted: [Bug 178034] Add API to clean CacheStorage data : [Attachment 323321] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 11 09:03:00 PDT 2017
Chris Dumez <cdumez at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 178034: Add API to clean CacheStorage data
https://bugs.webkit.org/show_bug.cgi?id=178034
Attachment 323321: Patch
https://bugs.webkit.org/attachment.cgi?id=323321&action=review
--- Comment #19 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 323321
--> https://bugs.webkit.org/attachment.cgi?id=323321
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=323321&action=review
r=me with comments.
> Source/WTF/wtf/CallbackAggregator.h:29
> +#include "RunLoop.h"
Probably want MainThread.h instead.
> Source/WTF/wtf/CallbackAggregator.h:46
> + RunLoop::main().dispatch([callback = WTFMove(m_callback)] () mutable
{
You cannot use RunLoop::main().dispatch() here because of WK1/iOS.
callOnMainThread() is the way to go I believe.
> Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp:123
> +void Caches::clear(WTF::Function<void()>&& completionHandler)
We may want to use a WTF::CompletionHandler here instead.
> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h:73
> +WK_EXPORT void
WKWebsiteDataStoreRemoveDOMCacheForOrigin(WKWebsiteDataStoreRef dataStoreRef,
WKSecurityOriginRef origin);
I do not think we should be use DOMCache in API.
> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h:74
> +WK_EXPORT void WKWebsiteDataStoreRemoveAllDOMCaches(WKWebsiteDataStoreRef
dataStoreRef);
ditto.
> Tools/WebKitTestRunner/TestController.cpp:2308
> + WKWebsiteDataStoreRemoveDOMCacheForOrigin(websiteDataStore,
WKSecurityOriginCreateFromString(origin));
Looks like you're leaking the result of WKSecurityOriginCreateFromString() ? I
guess you want to adopt the result and store it in a local variable.
More information about the webkit-reviews
mailing list