[webkit-reviews] review granted: [Bug 175884] [Cache API] UIProcess should provide the directory path where to store Cache Storage data : [Attachment 318874] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 24 09:19:16 PDT 2017


Brady Eidson <beidson at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 175884: [Cache API] UIProcess should provide the directory path where to
store Cache Storage data
https://bugs.webkit.org/show_bug.cgi?id=175884

Attachment 318874: Patch

https://bugs.webkit.org/attachment.cgi?id=318874&action=review




--- Comment #3 from Brady Eidson <beidson at apple.com> ---
Comment on attachment 318874
  --> https://bugs.webkit.org/attachment.cgi?id=318874
Patch

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

R+ with comments

> Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h:43
> +WK_EXPORT WKStringRef
WKContextConfigurationCopyCacheStorageDirectory(WKContextConfigurationRef
configuration);
> +WK_EXPORT void
WKContextConfigurationSetCacheStorageDirectory(WKContextConfigurationRef
configuration, WKStringRef cacheStorageDirectory);
> +

Since there's no tests and therefore no user of this API, just skip it in this
patch.

When we do need to expose the API to set the directory, please do so on
WKProcessPool instead.

The C-API should be a dead man walking at this point.

> Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:58
> +String WebsiteDataStore::defaultCacheStorageDirectory()
> +{
> +    return cacheDirectoryFileSystemRepresentation("CacheStorage");
> +}

I know you're not using this yet, but probably plan to soon.

That said, cacheDirectoryFileSystemRepresentation() is wrong as it picks a
directory in the NSCachesDirectory folder.

I think we want websiteDataDirectoryFileSystemRepresentation() instead


More information about the webkit-reviews mailing list