[webkit-reviews] review granted: [Bug 175995] [Cache API] Support cache names persistency : [Attachment 319303] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 30 13:41:54 PDT 2017


Alex Christensen <achristensen at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 175995: [Cache API] Support cache names persistency
https://bugs.webkit.org/show_bug.cgi?id=175995

Attachment 319303: Patch

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




--- Comment #22 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 319303
  --> https://bugs.webkit.org/attachment.cgi?id=319303
Patch

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

> Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:246
> +    if (!shouldPersist()) {
> +	   m_salt = makeSalt();

I don't think we should need  a salt of it's not persistent.

> Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:361
> +	       callback(std::nullopt);

Let's put an ASSERT(RunLoop::isMain()); here.

> Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:384
> +	       callback(data, error);

Same here.  It might be worth having a bunch of such assertions.

> Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp:163
> +    Vector<String> names;
> +    names.reserveInitialCapacity(count);

We should use the VectorCoders and put the reserveInitialCapacity optimization
in them.


More information about the webkit-reviews mailing list