[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 16:40:14 PST 2020


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

--- Comment #21 from Basuke Suzuki <Basuke.Suzuki at sony.com> ---
(In reply to Takashi Komori from comment #18)
> > That is similar to Cocoa's delegation pattern. Adding that to each method
> > gives more context to implementation side, i.e. who will require them. Also
> > it may solve future method name conflict.
> 
> CurlStreamHandleImpl's lifetime is different from CurlStream's, so it is
> possible that when CurlStreamHandleImple::didFail is invoked, the CurlStream
> instance already had been destructed.
> To implement that we should consider not to access destructed instances too.

Good point. Then use CurlStreamId instead. That represents the CurlStream itself and it's just an identifier, but client code can be distinguishable by that argument.

> > > Source/WebCore/platform/network/curl/CurlStreamScheduler.h:65
> > > +    HashMap<CurlStreamID, CurlStream::Client*> m_clientLists;
> > 
> > The value of item cannot be nullptr, so is should be CurlStream::Client&
> 
> We can't use reference here because CurlStream::Client is abstract class as
> we can't get the instance by calling m_clientLists.get

Ah, okay. Sorry about this.

-- 
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/a97eaeee/attachment-0001.htm>


More information about the webkit-unassigned mailing list