Skip to content

Commit

Permalink
Switch to libwebrtc new DNS resolver interface
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=265791
rdar://119133276

Reviewed by Eric Carlson.

Migrate code from deprecated webrtc::AsyncResolverFactory to webrtc::AsyncDnsResolverFactory.
This in particular simplifies how we do memory management, since the peer connection factory is now owned by the peer connection.

We keep using a map of WeakPtr to allow to handle IPC responses from network process.

We work around a header conflict between SDK and libwebrtc by isolating absl::InvokeCall in LibWebRTCDnsResolverFactory.cpp.

* Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::createPeerConnection):
* Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h:
* Source/WebKit/Sources.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCDnsResolverFactory.cpp: Added.
(WebKit::LibWebRTCDnsResolverFactory::CreateAndResolve):
(WebKit::LibWebRTCDnsResolverFactory::Create):
(WebKit::LibWebRTCDnsResolverFactory::Resolver::Start):
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCDnsResolverFactory.h: Added.
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::LibWebRTCProvider::createPeerConnection):
(WebKit::RTCSocketFactory::CreateAsyncDnsResolver):
(WebKit::RTCSocketFactory::CreateAsyncResolver): Deleted.
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCResolver.cpp:
(WebKit::LibWebRTCResolver::~LibWebRTCResolver):
(WebKit::LibWebRTCResolver::start):
(WebKit::LibWebRTCResolver::result const):
(WebKit::LibWebRTCResolver::setResolvedAddress):
(WebKit::LibWebRTCResolver::setError):
(WebKit::LibWebRTCResolver::Start): Deleted.
(WebKit::LibWebRTCResolver::Destroy): Deleted.
(WebKit::LibWebRTCResolver::doDestroy): Deleted.
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCResolver.h:
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
(WebKit::LibWebRTCSocketFactory::createAsyncDnsResolver):
(WebKit::LibWebRTCSocketFactory::createAsyncResolver): Deleted.
* Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
(WebKit::LibWebRTCSocketFactory::resolver):
(WebKit::LibWebRTCSocketFactory::removeResolver):
(WebKit::LibWebRTCSocketFactory::takeResolver): Deleted.
* Source/WebKit/WebProcess/Network/webrtc/WebRTCResolver.cpp:
(WebKit::WebRTCResolver::setResolvedAddress):
(WebKit::WebRTCResolver::resolvedAddressError):

Canonical link: https://commits.webkit.org/272029@main
  • Loading branch information
youennf committed Dec 14, 2023
1 parent ad15255 commit fb5c6b1
Show file tree
Hide file tree
Showing 11 changed files with 211 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,7 @@ void LibWebRTCProvider::setUseDTLS10(bool useDTLS10)
m_factory->SetOptions(options);
}

ALLOW_DEPRECATED_DECLARATIONS_BEGIN
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=265791
rtc::scoped_refptr<webrtc::PeerConnectionInterface> LibWebRTCProvider::createPeerConnection(webrtc::PeerConnectionObserver& observer, rtc::NetworkManager& networkManager, rtc::PacketSocketFactory& packetSocketFactory, webrtc::PeerConnectionInterface::RTCConfiguration&& configuration, std::unique_ptr<webrtc::AsyncResolverFactory>&& asyncResolveFactory)
rtc::scoped_refptr<webrtc::PeerConnectionInterface> LibWebRTCProvider::createPeerConnection(webrtc::PeerConnectionObserver& observer, rtc::NetworkManager& networkManager, rtc::PacketSocketFactory& packetSocketFactory, webrtc::PeerConnectionInterface::RTCConfiguration&& configuration, std::unique_ptr<webrtc::AsyncDnsResolverFactoryInterface>&& asyncDnsResolverFactory)
{
auto& factoryAndThreads = getStaticFactoryAndThreads(m_useNetworkThreadWithSocketServer);

Expand All @@ -408,15 +406,14 @@ rtc::scoped_refptr<webrtc::PeerConnectionInterface> LibWebRTCProvider::createPee

webrtc::PeerConnectionDependencies dependencies { &observer };
dependencies.allocator = WTFMove(portAllocator);
dependencies.async_resolver_factory = WTFMove(asyncResolveFactory);
dependencies.async_dns_resolver_factory = WTFMove(asyncDnsResolverFactory);

auto peerConnectionOrError = m_factory->CreatePeerConnectionOrError(configuration, WTFMove(dependencies));
if (!peerConnectionOrError.ok())
return nullptr;

return peerConnectionOrError.MoveValue();
}
ALLOW_DEPRECATED_DECLARATIONS_END

void LibWebRTCProvider::prepareCertificateGenerator(Function<void(rtc::RTCCertificateGenerator&)>&& callback)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class RTCCertificateGenerator;
}

namespace webrtc {
class AsyncResolverFactory;
class AsyncDnsResolverFactory;
class PeerConnectionFactoryInterface;
}

Expand Down Expand Up @@ -122,10 +122,7 @@ class WEBCORE_EXPORT LibWebRTCProvider : public WebRTCProvider {
protected:
LibWebRTCProvider();

ALLOW_DEPRECATED_DECLARATIONS_BEGIN
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=265791
rtc::scoped_refptr<webrtc::PeerConnectionInterface> createPeerConnection(webrtc::PeerConnectionObserver&, rtc::NetworkManager&, rtc::PacketSocketFactory&, webrtc::PeerConnectionInterface::RTCConfiguration&&, std::unique_ptr<webrtc::AsyncResolverFactory>&&);
ALLOW_DEPRECATED_DECLARATIONS_END
rtc::scoped_refptr<webrtc::PeerConnectionInterface> createPeerConnection(webrtc::PeerConnectionObserver&, rtc::NetworkManager&, rtc::PacketSocketFactory&, webrtc::PeerConnectionInterface::RTCConfiguration&&, std::unique_ptr<webrtc::AsyncDnsResolverFactoryInterface>&&);

rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> createPeerConnectionFactory(rtc::Thread* networkThread, rtc::Thread* signalingThread);
virtual std::unique_ptr<webrtc::VideoDecoderFactory> createDecoderFactory();
Expand Down
24 changes: 11 additions & 13 deletions Source/WebKit/WebKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 55;
objectVersion = 54;
objects = {

/* Begin PBXAggregateTarget section */
Expand Down Expand Up @@ -1020,6 +1020,7 @@
417915B92257046F00D6F97E /* NetworkSocketChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 417915B62257046E00D6F97E /* NetworkSocketChannel.h */; };
41897ED11F415D680016FA42 /* WebCacheStorageConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 41897ECD1F415D5C0016FA42 /* WebCacheStorageConnection.h */; };
4193927828BE41C000162139 /* LSApplicationWorkspaceSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 4193927728BE41C000162139 /* LSApplicationWorkspaceSPI.h */; };
419E200F2B286E8900BB13A6 /* LibWebRTCDnsResolverFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419E200D2B286CF700BB13A6 /* LibWebRTCDnsResolverFactory.cpp */; };
41A0EB142641714900794471 /* LibWebRTCCodecsProxy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41E0A7C823B6397900561060 /* LibWebRTCCodecsProxy.mm */; };
41C5379021F15B55008B1FAD /* _WKWebsiteDataStoreDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 41C5378F21F1362D008B1FAD /* _WKWebsiteDataStoreDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
41D129DA1F3D101800D15E47 /* WebCacheStorageProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 41D129D91F3D101400D15E47 /* WebCacheStorageProvider.h */; };
Expand Down Expand Up @@ -4937,6 +4938,8 @@
4193927728BE41C000162139 /* LSApplicationWorkspaceSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSApplicationWorkspaceSPI.h; sourceTree = "<group>"; };
419ACF9B1F981D26009F1A83 /* WebServiceWorkerFetchTaskClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebServiceWorkerFetchTaskClient.h; sourceTree = "<group>"; };
419BD18F28E1A86C0089D7B7 /* VideoCodecType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VideoCodecType.h; sourceTree = "<group>"; };
419E200D2B286CF700BB13A6 /* LibWebRTCDnsResolverFactory.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibWebRTCDnsResolverFactory.cpp; path = Network/webrtc/LibWebRTCDnsResolverFactory.cpp; sourceTree = "<group>"; };
419E200E2B286CF700BB13A6 /* LibWebRTCDnsResolverFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibWebRTCDnsResolverFactory.h; path = Network/webrtc/LibWebRTCDnsResolverFactory.h; sourceTree = "<group>"; };
41A5F7B9226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthenticationChallengeDispositionCocoa.h; sourceTree = "<group>"; };
41A5F7BA226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AuthenticationChallengeDispositionCocoa.mm; sourceTree = "<group>"; };
41AC86811E042E5300303074 /* WebRTCResolver.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; name = WebRTCResolver.messages.in; path = Network/webrtc/WebRTCResolver.messages.in; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = "<none>"; };
Expand Down Expand Up @@ -11216,6 +11219,8 @@
4130759E1DE85E650039EC69 /* webrtc */ = {
isa = PBXGroup;
children = (
419E200D2B286CF700BB13A6 /* LibWebRTCDnsResolverFactory.cpp */,
419E200E2B286CF700BB13A6 /* LibWebRTCDnsResolverFactory.h */,
416F8089245C7FF500B68F02 /* LibWebRTCNetwork.cpp */,
411B22621E371244004F7363 /* LibWebRTCNetwork.h */,
416F8086245B397400B68F02 /* LibWebRTCNetwork.messages.in */,
Expand Down Expand Up @@ -18306,6 +18311,7 @@
2984F588164BA095004BC0C6 /* LegacyCustomProtocolManagerMessageReceiver.cpp in Sources */,
2984F57C164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessageReceiver.cpp in Sources */,
41A0EB142641714900794471 /* LibWebRTCCodecsProxy.mm in Sources */,
419E200F2B286E8900BB13A6 /* LibWebRTCDnsResolverFactory.cpp in Sources */,
51F060E11654318500F3281C /* LibWebRTCNetworkMessageReceiver.cpp in Sources */,
449D90DA21FDC30B00F677C0 /* LocalAuthenticationSoftLink.mm in Sources */,
A141DF502B06ED0F00E80B2D /* MediaCapability.mm in Sources */,
Expand Down Expand Up @@ -18853,9 +18859,7 @@
};
5C400E6A29DB8AB500446F6F /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
platformFilters = (
ios,
);
platformFilter = ios;
target = 5C139DA129DB82E500D5117B /* WebContentCaptivePortalExtension */;
targetProxy = 5C400E6929DB8AB500446F6F /* PBXContainerItemProxy */;
};
Expand All @@ -18871,25 +18875,19 @@
};
5CE4B60729CEBB760038F565 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
platformFilters = (
ios,
);
platformFilter = ios;
target = 5CA5A2C929CBBA1A000F1046 /* WebContentExtension */;
targetProxy = 5CE4B60629CEBB760038F565 /* PBXContainerItemProxy */;
};
5CE4B62329CF880B0038F565 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
platformFilters = (
ios,
);
platformFilter = ios;
target = 5CE4B61529CF877F0038F565 /* GPUExtension */;
targetProxy = 5CE4B62229CF880B0038F565 /* PBXContainerItemProxy */;
};
5CE4B62529CF880B0038F565 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
platformFilters = (
ios,
);
platformFilter = ios;
target = 5CE4B60829CF87680038F565 /* NetworkingExtension */;
targetProxy = 5CE4B62429CF880B0038F565 /* PBXContainerItemProxy */;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "config.h"
#include "LibWebRTCDnsResolverFactory.h"

#if USE(LIBWEBRTC)

#include "LibWebRTCNetwork.h"
#include "WebProcess.h"

namespace WebKit {

std::unique_ptr<webrtc::AsyncDnsResolverInterface> LibWebRTCDnsResolverFactory::CreateAndResolve(const rtc::SocketAddress& address, absl::AnyInvocable<void()> callback)
{
auto resolver = WebProcess::singleton().libWebRTCNetwork().socketFactory().createAsyncDnsResolver();
resolver->start(address, [callback = absl::move(callback)] () mutable {
callback();
});
return resolver;
}

std::unique_ptr<webrtc::AsyncDnsResolverInterface> LibWebRTCDnsResolverFactory::CreateAndResolve(const rtc::SocketAddress& address, int /* family */, absl::AnyInvocable<void()> callback)
{
auto resolver = WebProcess::singleton().libWebRTCNetwork().socketFactory().createAsyncDnsResolver();
// FIXME: Make use of family.
resolver->start(address, [callback = absl::move(callback)] () mutable {
callback();
});
return resolver;
}

std::unique_ptr<webrtc::AsyncDnsResolverInterface> LibWebRTCDnsResolverFactory::Create()
{
return WebProcess::singleton().libWebRTCNetwork().socketFactory().createAsyncDnsResolver();
}

void LibWebRTCDnsResolverFactory::Resolver::Start(const rtc::SocketAddress& address, absl::AnyInvocable<void()> callback)
{
start(address, [callback = absl::move(callback)] () mutable {
callback();
});
}

void LibWebRTCDnsResolverFactory::Resolver::Start(const rtc::SocketAddress& address, int /* family */, absl::AnyInvocable<void()> callback)
{
// FIXME: Make use of family.
start(address, [callback = absl::move(callback)] () mutable {
callback();
});
}

} // namespace WebKit

#endif // USE(LIBWEBRTC)
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#pragma once

#if USE(LIBWEBRTC)

#include <WebCore/LibWebRTCMacros.h>

ALLOW_COMMA_BEGIN
#include <webrtc/api/async_dns_resolver.h>
ALLOW_COMMA_END

#include <wtf/FastMalloc.h>
#include <wtf/Function.h>

namespace WebKit {

class LibWebRTCDnsResolverFactory final : public webrtc::AsyncDnsResolverFactoryInterface {
WTF_MAKE_FAST_ALLOCATED;
public:
class Resolver : public webrtc::AsyncDnsResolverInterface {
public:
virtual void start(const rtc::SocketAddress&, Function<void()>&&) = 0;

private:
// webrtc::AsyncDnsResolverInterface
void Start(const rtc::SocketAddress&, absl::AnyInvocable<void()>) final;
void Start(const rtc::SocketAddress&, int family, absl::AnyInvocable<void()>) final;
};

private:
std::unique_ptr<webrtc::AsyncDnsResolverInterface> CreateAndResolve(const rtc::SocketAddress&, absl::AnyInvocable<void()>) final;
std::unique_ptr<webrtc::AsyncDnsResolverInterface> CreateAndResolve(const rtc::SocketAddress&, int family, absl::AnyInvocable<void()>) final;
std::unique_ptr<webrtc::AsyncDnsResolverInterface> Create() final;
};

} // namespace WebKit

#endif // USE(LIBWEBRTC)
28 changes: 5 additions & 23 deletions Source/WebKit/WebProcess/Network/webrtc/LibWebRTCProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "LibWebRTCCodecs.h"
#endif

#include "LibWebRTCDnsResolverFactory.h"
#include "LibWebRTCNetwork.h"
#include "LibWebRTCNetworkManager.h"
#include "RTCDataChannelRemoteManager.h"
Expand All @@ -43,26 +44,13 @@

ALLOW_COMMA_BEGIN

#include <webrtc/api/async_resolver_factory.h>
#include <webrtc/pc/peer_connection_factory.h>

ALLOW_COMMA_END

namespace WebKit {
using namespace WebCore;

ALLOW_DEPRECATED_DECLARATIONS_BEGIN
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=265791
class AsyncResolverFactory : public webrtc::AsyncResolverFactory {
WTF_MAKE_FAST_ALLOCATED;
private:
rtc::AsyncResolverInterface* Create() final
{
return WebProcess::singleton().libWebRTCNetwork().socketFactory().createAsyncResolver();
}
};
ALLOW_DEPRECATED_DECLARATIONS_END

LibWebRTCProvider::LibWebRTCProvider(WebPage& webPage)
: m_webPage(webPage)
{
Expand All @@ -85,7 +73,7 @@ rtc::scoped_refptr<webrtc::PeerConnectionInterface> LibWebRTCProvider::createPee
networkManager->setEnumeratingAllNetworkInterfacesEnabled(isEnumeratingAllNetworkInterfacesEnabled());
networkManager->setEnumeratingVisibleNetworkInterfacesEnabled(isEnumeratingVisibleNetworkInterfacesEnabled());

return WebCore::LibWebRTCProvider::createPeerConnection(observer, *networkManager, *socketFactory, WTFMove(configuration), makeUnique<AsyncResolverFactory>());
return WebCore::LibWebRTCProvider::createPeerConnection(observer, *networkManager, *socketFactory, WTFMove(configuration), makeUnique<LibWebRTCDnsResolverFactory>());
}

void LibWebRTCProvider::disableNonLocalhostConnections()
Expand All @@ -105,10 +93,7 @@ class RTCSocketFactory final : public LibWebRTCProvider::SuspendableSocketFactor
rtc::AsyncPacketSocket* CreateUdpSocket(const rtc::SocketAddress&, uint16_t minPort, uint16_t maxPort) final;
rtc::AsyncListenSocket* CreateServerTcpSocket(const rtc::SocketAddress&, uint16_t minPort, uint16_t maxPort, int options) final { return nullptr; }
rtc::AsyncPacketSocket* CreateClientTcpSocket(const rtc::SocketAddress& localAddress, const rtc::SocketAddress& remoteAddress, const rtc::ProxyInfo&, const std::string&, const rtc::PacketSocketTcpOptions&) final;
ALLOW_DEPRECATED_DECLARATIONS_BEGIN
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=265791
rtc::AsyncResolverInterface* CreateAsyncResolver() final;
ALLOW_DEPRECATED_DECLARATIONS_END
std::unique_ptr<webrtc::AsyncDnsResolverInterface> CreateAsyncDnsResolver() final;
void suspend() final;
void resume() final;

Expand Down Expand Up @@ -140,13 +125,10 @@ rtc::AsyncPacketSocket* RTCSocketFactory::CreateClientTcpSocket(const rtc::Socke
return WebProcess::singleton().libWebRTCNetwork().socketFactory().createClientTcpSocket(m_contextIdentifier, localAddress, remoteAddress, String { m_userAgent }, options, m_pageIdentifier, m_isFirstParty, m_isRelayDisabled, m_domain);
}

ALLOW_DEPRECATED_DECLARATIONS_BEGIN
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=265791
rtc::AsyncResolverInterface* RTCSocketFactory::CreateAsyncResolver()
std::unique_ptr<webrtc::AsyncDnsResolverInterface> RTCSocketFactory::CreateAsyncDnsResolver()
{
return WebProcess::singleton().libWebRTCNetwork().socketFactory().createAsyncResolver();
return WebProcess::singleton().libWebRTCNetwork().socketFactory().createAsyncDnsResolver();
}
ALLOW_DEPRECATED_DECLARATIONS_END

void RTCSocketFactory::suspend()
{
Expand Down
Loading

0 comments on commit fb5c6b1

Please sign in to comment.