<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Network Cache: Deduplicate body data"
href="https://bugs.webkit.org/show_bug.cgi?id=143652#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Network Cache: Deduplicate body data"
href="https://bugs.webkit.org/show_bug.cgi?id=143652">bug 143652</a>
from <span class="vcard"><a class="email" href="mailto:cdumez@apple.com" title="Chris Dumez <cdumez@apple.com>"> <span class="fn">Chris Dumez</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=250632&action=diff" name="attach_250632" title="patch">attachment 250632</a> <a href="attachment.cgi?id=250632&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=250632&action=review">https://bugs.webkit.org/attachment.cgi?id=250632&action=review</a>
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:37
> +#if ENABLE(NETWORK_CACHE)</span >
Usually between the main header include (#include "NetworkCacheBlobStorage.h") and the remaining includes (#include "Logging.h" ...)
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:43
> + : m_blobDirectoryPath(blobDirectoryPath.utf8())</span >
Why are we storing the path as a CString when we always use it as a String? I am guessing this has to do with thread-safety somehow?
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:60
> + unlink(filePath.data());</span >
Why aren't we using WebCore::deleteFile()?
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:85
> + unlink(linkPath.data());</span >
Why aren't we using WebCore::deleteFile()?
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:87
> + bool blobExists = access(blobPath.data(), F_OK) != -1;</span >
WebCore::fileExists() ?
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:94
> + unlink(blobPath.data());</span >
WebCore::deleteFile()?
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:144
> + unlink(linkPath.data());</span >
WebCore::deleteFile()?
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:155
> + return stat.st_nlink - 1;</span >
Why the - 1 ? Maybe add a comment for clarity.
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:310
> +static Data encodeRecordHeader(const Storage::Record& record, SHA1::Digest bodyHash)</span >
Why are we copying the Digest? (it is an std::array<uint8_t, 20>).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>