[Webkit-unassigned] [Bug 145797] [SOUP] Network Cache: run the IO completion handler in the given queue instead of the whole operation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 9 08:24:22 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=145797
--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #3)
> Comment on attachment 254561 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=254561&action=review
>
> > Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:119
> > + auto asyncData = std::unique_ptr<ReadAsyncData>(asyncDataPtr);
>
> This can be just
>
> std::unique_ptr<ReadAsyncData> asyncData(asyncDataPtr);
>
> Same for the rest of such statements.
Ok, no much difference anyway.
> > Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:188
> > + Data data;
> > + completionHandler(data, -1);
>
> You could probably just construct the Data object in the completionHandler
> call:
>
> completionHandler(Data(), -1);
No, that doesn't build.
no known conversion for argument 1 from âWebKit::NetworkCache::Dataâ to âWebKit::NetworkCache::Data&â
> > Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:191
> > + g_cond_wait(&condition, &mutex);
>
> Can this function be called on the main thread, with a null queue?
No this, is always called from a thread. I'll add an assert to ensure it.
> 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.
>
> > Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:223
> > g_cond_wait(&condition, &mutex);
>
> Same problem here.
Yes, we definitely don't want to block the main thread ever.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150609/afdb3d91/attachment-0001.html>
More information about the webkit-unassigned
mailing list