[Webkit-unassigned] [Bug 187984] [Curl] Use shared single thread for WebSocket connections

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 3 19:25:52 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=187984

--- Comment #22 from Fujii Hironori <Hironori.Fujii at sony.com> ---
Comment on attachment 389232
  --> https://bugs.webkit.org/attachment.cgi?id=389232
Handling connections by one thread.

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

>>>> Source/WebCore/platform/network/curl/CurlStreamScheduler.cpp:48
>>>> +    m_nextStreamID = (m_nextStreamID + 1 != invalidCurlStreamID) ? m_nextStreamID + 1 : 1;
>>> 
>>> You don't check m_nextStreamID is not used.
>>> Can you use the pointer of client instead of m_nextStreamID?
>> 
>> The timing of issuing ID and object allocation is different. We cannot simply use the address as an id. Also memory region can be reused for same object type and it is safe not to use address. But existence check is required.
> 
> Fixed not to use in-use IDs.
> As stand in comment11 we cannot substitute IDs by pointers.

I don't agree on this. SocketStreamHandleImpl always lives longer than CurlStream.
Even if CurlStream would be alive longer than SocketStreamHandleImpl, I think using WeakPtr is better because HashMap is expensive.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200204/58f8fe71/attachment-0001.htm>


More information about the webkit-unassigned mailing list