Handle MDNS resolution of candidates through libwebrtc directly
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2018 18:15:19 +0000 (18:15 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2018 18:15:19 +0000 (18:15 +0000)
commit3481b8b94a89aa9f517f4457435e2e7c0b8eced5
tree3ada6dd2360e205f737b271b39735292af88ad34
parent72a2123a3b470f7c0cc927cef5927c51fe7a933a
Handle MDNS resolution of candidates through libwebrtc directly
https://bugs.webkit.org/show_bug.cgi?id=190681

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:

Source/WebCore:

Remove the previous MDNS resolution mechanism.
Instead, add support for the AsyncResolver mechanism added to libwebrtc.
Covered by current mdns webrtc test that is unflaked.

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::addIceCandidate):
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::createPeerConnection):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:
* testing/MockLibWebRTCPeerConnection.cpp:
(WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):
* testing/MockLibWebRTCPeerConnection.h:

Source/WebKit:

Add support for AsyncResolver to resolve MDNS.
This basically reuse the code path used to resolve STUN server addresses.
Removed MDNS specific resolution.
Use existing CFHost resolution mechanism to do the actual resolution.

* NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
(WebKit::NetworkMDNSRegister::registerMDNSName):
* NetworkProcess/webrtc/NetworkMDNSRegister.messages.in:
* WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::LibWebRTCProvider::createPeerConnection):
* WebProcess/Network/webrtc/LibWebRTCProvider.h:
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
* WebProcess/Network/webrtc/WebMDNSRegister.cpp:
* WebProcess/Network/webrtc/WebMDNSRegister.h:
* WebProcess/Network/webrtc/WebMDNSRegister.messages.in:

LayoutTests:

* TestExpectations:
Test should no longer be flaky as we no longer enforce a timer for resolving MDNS candidates.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h
Source/WebCore/testing/MockLibWebRTCPeerConnection.cpp
Source/WebCore/testing/MockLibWebRTCPeerConnection.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp
Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.messages.in
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCProvider.cpp
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCProvider.h
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.h
Source/WebKit/WebProcess/Network/webrtc/WebMDNSRegister.cpp
Source/WebKit/WebProcess/Network/webrtc/WebMDNSRegister.h
Source/WebKit/WebProcess/Network/webrtc/WebMDNSRegister.messages.in