⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 282210 in webkit


Ignore:
Timestamp:
Sep 9, 2021, 5:16:04 AM (5 years ago)
Author:
youenn@apple.com
Message:

Categorize WebRTC TCP nw connections like done for WebRTC UDP nw connections
https://bugs.webkit.org/show_bug.cgi?id=229801

Reviewed by Eric Carlson.

Move NetworkRTCUDPSocketCocoa tracker related code to its own routine in NetworkRTCUtilitiesCocoa.
Make use of that routine in NetworkRTCTCPSocketCocoa.
To do so, we need to pass more information when creating a client TCP socket from WebProcess to NetworkProcess.
Manually tested.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::createClientTCPSocket):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:

(WebKit::NetworkRTCTCPSocketCocoa::createClientTCPSocket):
(WebKit::NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa):

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:

(WebKit::NetworkRTCUDPSocketCocoaConnections::configureParameters):
(WebKit::isKnownTracker): Deleted.

  • NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.h:
  • NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.mm:

(WebKit::setNWParametersTrackerOptions):
(WebKit::isKnownTracker):

  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:

(WebKit::RTCSocketFactory::CreateClientTcpSocket):

  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:

(WebKit::LibWebRTCSocketFactory::createClientTcpSocket):

  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
Location:
trunk/Source/WebKit
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r282191 r282210  
     12021-09-09  Youenn Fablet  <youenn@apple.com>
     2
     3        Categorize WebRTC TCP nw connections like done for WebRTC UDP nw connections
     4        https://bugs.webkit.org/show_bug.cgi?id=229801
     5
     6        Reviewed by Eric Carlson.
     7
     8        Move NetworkRTCUDPSocketCocoa tracker related code to its own routine in NetworkRTCUtilitiesCocoa.
     9        Make use of that routine in NetworkRTCTCPSocketCocoa.
     10        To do so, we need to pass more information when creating a client TCP socket from WebProcess to NetworkProcess.
     11        Manually tested.
     12
     13        * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
     14        (WebKit::NetworkRTCProvider::createClientTCPSocket):
     15        * NetworkProcess/webrtc/NetworkRTCProvider.h:
     16        * NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
     17        * NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h:
     18        * NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:
     19        (WebKit::NetworkRTCTCPSocketCocoa::createClientTCPSocket):
     20        (WebKit::NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa):
     21        * NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:
     22        (WebKit::NetworkRTCUDPSocketCocoaConnections::configureParameters):
     23        (WebKit::isKnownTracker): Deleted.
     24        * NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.h:
     25        * NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.mm:
     26        (WebKit::setNWParametersTrackerOptions):
     27        (WebKit::isKnownTracker):
     28        * WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
     29        (WebKit::RTCSocketFactory::CreateClientTcpSocket):
     30        * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
     31        (WebKit::LibWebRTCSocketFactory::createClientTcpSocket):
     32        * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
     33
    1342021-09-08  Ryosuke Niwa  <rniwa@webkit.org>
    235
  • trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.cpp

    r281982 r282210  
    203203#endif
    204204
    205 void NetworkRTCProvider::createClientTCPSocket(LibWebRTCSocketIdentifier identifier, const RTCNetwork::SocketAddress& localAddress, const RTCNetwork::SocketAddress& remoteAddress, String&& userAgent, int options, WebPageProxyIdentifier pageIdentifier, bool isRelayDisabled)
     205void NetworkRTCProvider::createClientTCPSocket(LibWebRTCSocketIdentifier identifier, const RTCNetwork::SocketAddress& localAddress, const RTCNetwork::SocketAddress& remoteAddress, String&& userAgent, int options, WebPageProxyIdentifier pageIdentifier, bool isFirstParty, bool isRelayDisabled, WebCore::RegistrableDomain&& domain)
    206206{
    207207    ASSERT(m_rtcNetworkThread.IsCurrent());
     
    209209#if PLATFORM(COCOA)
    210210    if (m_platformTCPSocketsEnabled) {
    211         if (auto socket = NetworkRTCTCPSocketCocoa::createClientTCPSocket(identifier, *this, remoteAddress.value, options, attributedBundleIdentifierFromPageIdentifier(pageIdentifier), isRelayDisabled, m_ipcConnection.copyRef())) {
     211        if (auto socket = NetworkRTCTCPSocketCocoa::createClientTCPSocket(identifier, *this, remoteAddress.value, options, attributedBundleIdentifierFromPageIdentifier(pageIdentifier), isFirstParty, isRelayDisabled, domain, m_ipcConnection.copyRef())) {
    212212            addSocket(identifier, WTFMove(socket));
    213213            return;
  • trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.h

    r281982 r282210  
    117117
    118118    void createUDPSocket(WebCore::LibWebRTCSocketIdentifier, const RTCNetwork::SocketAddress&, uint16_t, uint16_t, WebPageProxyIdentifier, bool isFirstParty, bool isRelayDisabled, WebCore::RegistrableDomain&&);
    119     void createClientTCPSocket(WebCore::LibWebRTCSocketIdentifier, const RTCNetwork::SocketAddress&, const RTCNetwork::SocketAddress&, String&& userAgent, int, WebPageProxyIdentifier, bool isRelayDisabled);
     119    void createClientTCPSocket(WebCore::LibWebRTCSocketIdentifier, const RTCNetwork::SocketAddress&, const RTCNetwork::SocketAddress&, String&& userAgent, int, WebPageProxyIdentifier, bool isFirstParty, bool isRelayDisabled, WebCore::RegistrableDomain&&);
    120120    void createServerTCPSocket(WebCore::LibWebRTCSocketIdentifier, const RTCNetwork::SocketAddress&, uint16_t minPort, uint16_t maxPort, int);
    121121    void wrapNewTCPConnection(WebCore::LibWebRTCSocketIdentifier identifier, WebCore::LibWebRTCSocketIdentifier newConnectionSocketIdentifier);
  • trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.messages.in

    r280556 r282210  
    2626    CreateUDPSocket(WebCore::LibWebRTCSocketIdentifier identifier, WebKit::RTCNetwork::SocketAddress localAddress, uint16_t minPort, uint16_t maxPort, WebKit::WebPageProxyIdentifier pageIdentifier, bool isFirstParty, bool isRelayDisabled, WebCore::RegistrableDomain domain)
    2727    CreateServerTCPSocket(WebCore::LibWebRTCSocketIdentifier identifier, WebKit::RTCNetwork::SocketAddress localAddress, uint16_t minPort, uint16_t maxPort, int options)
    28     CreateClientTCPSocket(WebCore::LibWebRTCSocketIdentifier identifier, WebKit::RTCNetwork::SocketAddress localAddress, WebKit::RTCNetwork::SocketAddress remoteAddress, String userAgent, int options, WebKit::WebPageProxyIdentifier pageIdentifier, bool isRelayDisabled)
     28    CreateClientTCPSocket(WebCore::LibWebRTCSocketIdentifier identifier, WebKit::RTCNetwork::SocketAddress localAddress, WebKit::RTCNetwork::SocketAddress remoteAddress, String userAgent, int options, WebKit::WebPageProxyIdentifier pageIdentifier, bool isFirstParty, bool isRelayDisabled, WebCore::RegistrableDomain domain)
    2929    WrapNewTCPConnection(WebCore::LibWebRTCSocketIdentifier identifier, WebCore::LibWebRTCSocketIdentifier newConnectionSocketIdentifier)
    3030
  • trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h

    r280556 r282210  
    4040    WTF_MAKE_FAST_ALLOCATED;
    4141public:
    42     static std::unique_ptr<NetworkRTCProvider::Socket> createClientTCPSocket(WebCore::LibWebRTCSocketIdentifier, NetworkRTCProvider&, const rtc::SocketAddress&, int options, const String& attributedBundleIdentifier, bool isRelayDisabled, Ref<IPC::Connection>&&);
     42    static std::unique_ptr<NetworkRTCProvider::Socket> createClientTCPSocket(WebCore::LibWebRTCSocketIdentifier, NetworkRTCProvider&, const rtc::SocketAddress&, int options, const String& attributedBundleIdentifier, bool isFirstParty, bool isRelayDisabled, const WebCore::RegistrableDomain&, Ref<IPC::Connection>&&);
    4343
    44     NetworkRTCTCPSocketCocoa(WebCore::LibWebRTCSocketIdentifier, NetworkRTCProvider&, const rtc::SocketAddress&, int options, const String& attributedBundleIdentifier, bool isRelayDisabled, Ref<IPC::Connection>&&);
     44    NetworkRTCTCPSocketCocoa(WebCore::LibWebRTCSocketIdentifier, NetworkRTCProvider&, const rtc::SocketAddress&, int options, const String& attributedBundleIdentifier, bool isFirstParty, bool isRelayDisabled, const WebCore::RegistrableDomain&, Ref<IPC::Connection>&&);
    4545
    4646private:
  • trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm

    r281982 r282210  
    5252}
    5353
    54 std::unique_ptr<NetworkRTCProvider::Socket> NetworkRTCTCPSocketCocoa::createClientTCPSocket(LibWebRTCSocketIdentifier identifier, NetworkRTCProvider& rtcProvider, const rtc::SocketAddress& remoteAddress, int tcpOptions, const String& attributedBundleIdentifier, bool isRelayDisabled, Ref<IPC::Connection>&& connection)
     54std::unique_ptr<NetworkRTCProvider::Socket> NetworkRTCTCPSocketCocoa::createClientTCPSocket(LibWebRTCSocketIdentifier identifier, NetworkRTCProvider& rtcProvider, const rtc::SocketAddress& remoteAddress, int tcpOptions, const String& attributedBundleIdentifier, bool isFirstParty, bool isRelayDisabled, const WebCore::RegistrableDomain& domain, Ref<IPC::Connection>&& connection)
    5555{
    5656    // FIXME: We should migrate ssltcp candidates, maybe support OPT_TLS_INSECURE as well.
    5757    if ((tcpOptions & rtc::PacketSocketFactory::OPT_TLS_FAKE) || (tcpOptions & rtc::PacketSocketFactory::OPT_TLS_INSECURE))
    5858        return nullptr;
    59     return makeUnique<NetworkRTCTCPSocketCocoa>(identifier, rtcProvider, remoteAddress, tcpOptions, attributedBundleIdentifier, isRelayDisabled, WTFMove(connection));
     59    return makeUnique<NetworkRTCTCPSocketCocoa>(identifier, rtcProvider, remoteAddress, tcpOptions, attributedBundleIdentifier, isFirstParty, isRelayDisabled, domain, WTFMove(connection));
    6060}
    6161
     
    8282}
    8383
    84 NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa(LibWebRTCSocketIdentifier identifier, NetworkRTCProvider& rtcProvider, const rtc::SocketAddress& remoteAddress, int options, const String& attributedBundleIdentifier, bool isRelayDisabled, Ref<IPC::Connection>&& connection)
     84NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa(LibWebRTCSocketIdentifier identifier, NetworkRTCProvider& rtcProvider, const rtc::SocketAddress& remoteAddress, int options, const String& attributedBundleIdentifier, bool isFirstParty, bool isRelayDisabled, const WebCore::RegistrableDomain& domain, Ref<IPC::Connection>&& connection)
    8585    : m_identifier(identifier)
    8686    , m_rtcProvider(rtcProvider)
     
    9999
    100100    setNWParametersApplicationIdentifiers(tcpTLS.get(), rtcProvider.applicationBundleIdentifier(), rtcProvider.sourceApplicationAuditToken(), attributedBundleIdentifier);
    101 
    102     if (isRelayDisabled)
    103         nw_parameters_set_account_id(tcpTLS.get(), "com.apple.safari.peertopeer");
     101    setNWParametersTrackerOptions(tcpTLS.get(), isRelayDisabled, isFirstParty, isKnownTracker(domain));
    104102
    105103    m_nwConnection = adoptNS(nw_connection_create(host.get(), tcpTLS.get()));
  • trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm

    r281982 r282210  
    3333#include "Logging.h"
    3434#include "NWParametersSPI.h"
    35 #include <WebCore/RegistrableDomain.h>
    3635#include <WebCore/STUNMessageParsing.h>
    3736#include <dispatch/dispatch.h>
     
    4140
    4241#if HAVE(NWPARAMETERS_TRACKER_API)
    43 SOFT_LINK_LIBRARY(libnetworkextension)
    44 SOFT_LINK_CLASS(libnetworkextension, NEHelperTrackerDisposition_t)
    45 SOFT_LINK_CLASS(libnetworkextension, NEHelperTrackerAppInfoRef)
    46 SOFT_LINK_CLASS(libnetworkextension, NEHelperTrackerDomainContextRef)
    47 SOFT_LINK(libnetworkextension, NEHelperTrackerGetDisposition, NEHelperTrackerDisposition_t*, (NEHelperTrackerAppInfoRef *app_info_ref, CFArrayRef domains, NEHelperTrackerDomainContextRef *trackerDomainContextRef, CFIndex *trackerDomainIndex), (app_info_ref, domains, trackerDomainContextRef, trackerDomainIndex))
    48 
    4942SOFT_LINK_LIBRARY_OPTIONAL(libnetwork)
    5043SOFT_LINK_OPTIONAL(libnetwork, nw_parameters_allow_sharing_port_with_listener, void, __cdecl, (nw_parameters_t, nw_listener_t))
     
    7366    WebCore::LibWebRTCSocketIdentifier m_identifier;
    7467    Ref<IPC::Connection> m_connection;
    75 #if HAVE(NWPARAMETERS_TRACKER_API)
    7668    bool m_isFirstParty { false };
    7769    bool m_isKnownTracker { false };
    78 #endif
    7970    bool m_shouldBypassRelay { false };
    8071
     
    150141}
    151142
    152 #if HAVE(NWPARAMETERS_TRACKER_API)
    153 static bool isKnownTracker(const WebCore::RegistrableDomain& domain)
    154 {
    155     NSArray<NSString *> *domains = @[domain.string()];
    156     NEHelperTrackerDomainContextRef *context = nil;
    157     CFIndex index = 0;
    158     return !!NEHelperTrackerGetDisposition(nullptr, (CFArrayRef)domains, context, &index);
    159 }
    160 #endif
    161 
    162143NetworkRTCUDPSocketCocoaConnections::NetworkRTCUDPSocketCocoaConnections(WebCore::LibWebRTCSocketIdentifier identifier, NetworkRTCProvider& rtcProvider, const rtc::SocketAddress& address, Ref<IPC::Connection>&& connection, String&& attributedBundleIdentifier, bool isFirstParty, bool isRelayDisabled, const WebCore::RegistrableDomain& domain)
    163144    : m_identifier(identifier)
    164145    , m_connection(WTFMove(connection))
    165 #if HAVE(NWPARAMETERS_TRACKER_API)
    166146    , m_isFirstParty(isFirstParty)
    167147    , m_isKnownTracker(isKnownTracker(domain))
    168 #endif
    169148    , m_shouldBypassRelay(isRelayDisabled)
    170149    , m_sourceApplicationBundleIdentifier(rtcProvider.applicationBundleIdentifier())
     
    238217    nw_ip_options_set_version(options.get(), version);
    239218
    240     if (m_shouldBypassRelay)
    241         nw_parameters_set_account_id(parameters, "com.apple.safari.peertopeer");
    242 #if HAVE(NWPARAMETERS_TRACKER_API)
    243     nw_parameters_set_is_third_party_web_content(parameters, !m_isFirstParty);
    244     nw_parameters_set_is_known_tracker(parameters, m_isKnownTracker);
    245 #endif
    246 
    247219    setNWParametersApplicationIdentifiers(parameters, m_sourceApplicationBundleIdentifier.data(), m_sourceApplicationAuditToken, m_attributedBundleIdentifier);
     220    setNWParametersTrackerOptions(parameters, m_shouldBypassRelay, m_isFirstParty, m_isKnownTracker);
    248221
    249222    nw_parameters_set_reuse_local_address(parameters, true);
  • trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.h

    r281982 r282210  
    3232#include <wtf/Forward.h>
    3333
     34namespace WebCore {
     35class RegistrableDomain;
     36}
     37
    3438namespace WebKit {
    3539
    3640void setNWParametersApplicationIdentifiers(nw_parameters_t, const char* sourceApplicationBundleIdentifier, std::optional<audit_token_t>, const String& attributedBundleIdentifier);
     41void setNWParametersTrackerOptions(nw_parameters_t, bool shouldBypassRelay, bool isFirstParty, bool isKnownTracker);
     42bool isKnownTracker(const WebCore::RegistrableDomain&);
    3743
    3844} // namespace WebKit
  • trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.mm

    r281982 r282210  
    2929#if USE(LIBWEBRTC)
    3030
     31#import <WebCore/RegistrableDomain.h>
    3132#import <wtf/SoftLinking.h>
    3233#import <wtf/text/WTFString.h>
    3334
    3435#if HAVE(NWPARAMETERS_TRACKER_API)
     36SOFT_LINK_LIBRARY(libnetworkextension)
     37SOFT_LINK_CLASS(libnetworkextension, NEHelperTrackerDisposition_t)
     38SOFT_LINK_CLASS(libnetworkextension, NEHelperTrackerAppInfoRef)
     39SOFT_LINK_CLASS(libnetworkextension, NEHelperTrackerDomainContextRef)
     40SOFT_LINK(libnetworkextension, NEHelperTrackerGetDisposition, NEHelperTrackerDisposition_t*, (NEHelperTrackerAppInfoRef *app_info_ref, CFArrayRef domains, NEHelperTrackerDomainContextRef *trackerDomainContextRef, CFIndex *trackerDomainIndex), (app_info_ref, domains, trackerDomainContextRef, trackerDomainIndex))
     41
    3542SOFT_LINK_LIBRARY_OPTIONAL(libnetwork)
    3643SOFT_LINK_OPTIONAL(libnetwork, nw_parameters_set_attributed_bundle_identifier, void, __cdecl, (nw_parameters_t, const char*))
     
    5259}
    5360
     61void setNWParametersTrackerOptions(nw_parameters_t parameters, bool shouldBypassRelay, bool isFirstParty, bool isKnownTracker)
     62{
     63    if (shouldBypassRelay)
     64        nw_parameters_set_account_id(parameters, "com.apple.safari.peertopeer");
     65#if HAVE(NWPARAMETERS_TRACKER_API)
     66    nw_parameters_set_is_third_party_web_content(parameters, !isFirstParty);
     67    nw_parameters_set_is_known_tracker(parameters, isKnownTracker);
     68#endif
     69}
     70
     71bool isKnownTracker(const WebCore::RegistrableDomain& domain)
     72{
     73#if HAVE(NWPARAMETERS_TRACKER_API)
     74    NSArray<NSString *> *domains = @[domain.string()];
     75    NEHelperTrackerDomainContextRef *context = nil;
     76    CFIndex index = 0;
     77    return !!NEHelperTrackerGetDisposition(nullptr, (CFArrayRef)domains, context, &index);
     78#else
     79    return false;
     80#endif
     81}
     82
    5483} // namespace WebKit
    5584
  • trunk/Source/WebKit/WebProcess/Network/webrtc/LibWebRTCProvider.cpp

    r282054 r282210  
    126126rtc::AsyncPacketSocket* RTCSocketFactory::CreateClientTcpSocket(const rtc::SocketAddress& localAddress, const rtc::SocketAddress& remoteAddress, const rtc::ProxyInfo&, const std::string&, const rtc::PacketSocketTcpOptions& options)
    127127{
    128     return WebProcess::singleton().libWebRTCNetwork().socketFactory().createClientTcpSocket(this, localAddress, remoteAddress, String { m_userAgent }, options, m_pageIdentifier, m_isRelayDisabled);
     128    return WebProcess::singleton().libWebRTCNetwork().socketFactory().createClientTcpSocket(this, localAddress, remoteAddress, String { m_userAgent }, options, m_pageIdentifier, m_isFirstParty, m_isRelayDisabled, m_domain);
    129129}
    130130
  • trunk/Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp

    r280556 r282210  
    105105}
    106106
    107 rtc::AsyncPacketSocket* LibWebRTCSocketFactory::createClientTcpSocket(const void* socketGroup, const rtc::SocketAddress& localAddress, const rtc::SocketAddress& remoteAddress, String&& userAgent, const rtc::PacketSocketTcpOptions& options, WebPageProxyIdentifier pageIdentifier, bool isRelayDisabled)
     107rtc::AsyncPacketSocket* LibWebRTCSocketFactory::createClientTcpSocket(const void* socketGroup, const rtc::SocketAddress& localAddress, const rtc::SocketAddress& remoteAddress, String&& userAgent, const rtc::PacketSocketTcpOptions& options, WebPageProxyIdentifier pageIdentifier, bool isFirstParty, bool isRelayDisabled, const WebCore::RegistrableDomain& domain)
    108108{
    109109    ASSERT(!WTF::isMainRunLoop());
     
    114114    // FIXME: We only transfer options.opts but should also handle other members.
    115115    if (m_connection)
    116         m_connection->send(Messages::NetworkRTCProvider::CreateClientTCPSocket(socket->identifier(), RTCNetwork::SocketAddress(prepareSocketAddress(localAddress, m_disableNonLocalhostConnections)), RTCNetwork::SocketAddress(prepareSocketAddress(remoteAddress, m_disableNonLocalhostConnections)), userAgent, options.opts, pageIdentifier, isRelayDisabled), 0);
     116        m_connection->send(Messages::NetworkRTCProvider::CreateClientTCPSocket(socket->identifier(), RTCNetwork::SocketAddress(prepareSocketAddress(localAddress, m_disableNonLocalhostConnections)), RTCNetwork::SocketAddress(prepareSocketAddress(remoteAddress, m_disableNonLocalhostConnections)), userAgent, options.opts, pageIdentifier, isFirstParty, isRelayDisabled, domain), 0);
    117117    else {
    118118        callOnMainRunLoop([] {
    119119            WebProcess::singleton().ensureNetworkProcessConnection();
    120120        });
    121         m_pendingMessageTasks.append([identifier = socket->identifier(), localAddress = RTCNetwork::SocketAddress(prepareSocketAddress(localAddress, m_disableNonLocalhostConnections)), remoteAddress = RTCNetwork::SocketAddress(prepareSocketAddress(remoteAddress, m_disableNonLocalhostConnections)), userAgent, opts = options.opts, pageIdentifier, isRelayDisabled](auto& connection) {
    122             connection.send(Messages::NetworkRTCProvider::CreateClientTCPSocket(identifier, localAddress, remoteAddress, userAgent, opts, pageIdentifier, isRelayDisabled), 0);
     121        m_pendingMessageTasks.append([identifier = socket->identifier(), localAddress = RTCNetwork::SocketAddress(prepareSocketAddress(localAddress, m_disableNonLocalhostConnections)), remoteAddress = RTCNetwork::SocketAddress(prepareSocketAddress(remoteAddress, m_disableNonLocalhostConnections)), userAgent, opts = options.opts, pageIdentifier, isFirstParty, isRelayDisabled, domain](auto& connection) {
     122            connection.send(Messages::NetworkRTCProvider::CreateClientTCPSocket(identifier, localAddress, remoteAddress, userAgent, opts, pageIdentifier, isFirstParty, isRelayDisabled, domain), 0);
    123123        });
    124124    }
  • trunk/Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.h

    r280556 r282210  
    5555    rtc::AsyncPacketSocket* createUdpSocket(const void* socketGroup, const rtc::SocketAddress&, uint16_t minPort, uint16_t maxPort, WebPageProxyIdentifier, bool isFirstParty, bool isRelayDisabled, const WebCore::RegistrableDomain&);
    5656    rtc::AsyncPacketSocket* createServerTcpSocket(const void* socketGroup, const rtc::SocketAddress&, uint16_t minPort, uint16_t maxPort, int options);
    57     rtc::AsyncPacketSocket* createClientTcpSocket(const void* socketGroup, const rtc::SocketAddress& localAddress, const rtc::SocketAddress& remoteAddress, String&& userAgent, const rtc::PacketSocketTcpOptions&, WebPageProxyIdentifier, bool isRelayDisabled);
     57    rtc::AsyncPacketSocket* createClientTcpSocket(const void* socketGroup, const rtc::SocketAddress& localAddress, const rtc::SocketAddress& remoteAddress, String&& userAgent, const rtc::PacketSocketTcpOptions&, WebPageProxyIdentifier, bool isFirstParty, bool isRelayDisabled, const WebCore::RegistrableDomain&);
    5858    rtc::AsyncPacketSocket* createNewConnectionSocket(LibWebRTCSocket&, WebCore::LibWebRTCSocketIdentifier newConnectionSocketIdentifier, const rtc::SocketAddress&);
    5959
Note: See TracChangeset for help on using the changeset viewer.