[webkit-reviews] review granted: [Bug 231171] Bind the number of WebRTC sockets opened per process : [Attachment 440064] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 6 08:47:01 PDT 2021


Alex Christensen <achristensen at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 231171: Bind the number of WebRTC sockets opened per process
https://bugs.webkit.org/show_bug.cgi?id=231171

Attachment 440064: Patch

https://bugs.webkit.org/attachment.cgi?id=440064&action=review




--- Comment #6 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 440064
  --> https://bugs.webkit.org/attachment.cgi?id=440064
Patch

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

>>> Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.h:156
>>> +	 StdMap<WebCore::LibWebRTCSocketIdentifier, std::unique_ptr<Socket>,
SocketComparator> m_sockets;
>> 
>> Can we use ListHashSet instead?
> 
> We could, I think StdMap is closer to what we want: a map (we very often
query the map by ID) which happens to have a key order (useful to close the
socket with a given order).

I think ListHashSet also does what you want and it uses fastMalloc.  StdMap
seems to only be used when we need to allow all possible keys (including 0 and
-1) but that isn't the case here.


More information about the webkit-reviews mailing list