<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [SOUP] Network Cache: run the IO completion handler in the given queue instead of the whole operation"
href="https://bugs.webkit.org/show_bug.cgi?id=145797#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [SOUP] Network Cache: run the IO completion handler in the given queue instead of the whole operation"
href="https://bugs.webkit.org/show_bug.cgi?id=145797">bug 145797</a>
from <span class="vcard"><a class="email" href="mailto:zan@falconsigh.net" title="Zan Dobersek <zan@falconsigh.net>"> <span class="fn">Zan Dobersek</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=254561&action=diff" name="attach_254561" title="Patch">attachment 254561</a> <a href="attachment.cgi?id=254561&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=254561&action=review">https://bugs.webkit.org/attachment.cgi?id=254561&action=review</a>
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:119
> + auto asyncData = std::unique_ptr<ReadAsyncData>(asyncDataPtr);</span >
This can be just
std::unique_ptr<ReadAsyncData> asyncData(asyncDataPtr);
Same for the rest of such statements.
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:188
> + Data data;
> + completionHandler(data, -1);</span >
You could probably just construct the Data object in the completionHandler call:
completionHandler(Data(), -1);
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:191
> + g_cond_wait(&condition, &mutex);</span >
Can this function be called on the main thread, with a null queue?
That would schedule the callback in the main context and continue to block the main thread in g_cond_wait(), with the callback never invoked.
<span class="quote">> Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:223
> g_cond_wait(&condition, &mutex);</span >
Same problem here.</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>