<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [SOUP] Add initial implementation of NetworkProcess disk cache"
href="https://bugs.webkit.org/show_bug.cgi?id=143872#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [SOUP] Add initial implementation of NetworkProcess disk cache"
href="https://bugs.webkit.org/show_bug.cgi?id=143872">bug 143872</a>
from <span class="vcard"><a class="email" href="mailto:cgarcia@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=143872#c8">comment #8</a>)
<span class="quote">> Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=251014&action=diff" name="attach_251014" title="Patch">attachment 251014</a> <a href="attachment.cgi?id=251014&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=251014&action=review">https://bugs.webkit.org/attachment.cgi?id=251014&action=review</a>
>
> Awesome stuff Carlos!</span >
Thanks.
<span class="quote">> > Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:34
> > +#include <fcntl.h>
>
> Why this?</span >
It's needed for open and its flags (O_CREAT, O_RDWR, etc.) in Linux, I guess it's not needed in mac, but doesn't hurt anyway.
<span class="quote">> > Source/WebKit2/NetworkProcess/cache/NetworkCacheDataSoup.cpp:29
> > +#if ENABLE(NETWORK_CACHE)
>
> Don't we need some USE(SOUP) or PLATFORM(LINUX) and the like?</span >
I assumed NETWORK_CACHE is already enabled depending on the port.
<span class="quote">> > Source/WebKit2/NetworkProcess/cache/NetworkCacheDataSoup.cpp:129
> > + ASSERT(map && map != MAP_FAILED);
>
> Perhaps better to split this in 2 ASSERTs in order to better spot the actual
> cause of failure.</span >
Ok, I think I copied this one from mac impl :-)
<span class="quote">> > Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:58
> > + ASSERT(m_outputStream || m_inputStream || m_ioStream);
>
> Same here about splitting the ASSERT</span >
Sure.
<span class="quote">> > Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:82
> > + }
>
> Can't we use Data directly instead of having to copy it from a SoupBuffer?</span >
I'm not sure I understand the question. We create a Data with a SoupBuffer to avoid copying the data. The read soup buffer will be reused on next read, so we need to copy that data appending it to the Data.</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>