Changeset 270626 in webkit
- Timestamp:
- Dec 10, 2020 7:37:49 AM (20 months ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 15 edited
-
ThirdParty/libwebrtc/ChangeLog (modified) (1 diff)
-
ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp (modified) (1 diff)
-
ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp (modified) (1 diff)
-
ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp (modified) (1 diff)
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/page/RuntimeEnabledFeatures.h (modified) (2 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/NetworkProcess/webrtc/NetworkRTCProvider.cpp (modified) (3 diffs)
-
WebKit/NetworkProcess/webrtc/NetworkRTCProvider.h (modified) (3 diffs)
-
WebKit/NetworkProcess/webrtc/NetworkRTCProvider.messages.in (modified) (1 diff)
-
WebKit/NetworkProcess/webrtc/NetworkRTCSocketCocoa.h (added)
-
WebKit/NetworkProcess/webrtc/NetworkRTCSocketCocoa.mm (added)
-
WebKit/SourcesCocoa.txt (modified) (1 diff)
-
WebKit/WebKit.xcodeproj/project.pbxproj (modified) (2 diffs)
-
WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/libwebrtc/ChangeLog
r270445 r270626 1 2020-12-10 Youenn Fablet <youenn@apple.com> 2 3 ICE does not resolve for `turns` relay candidates rooted in LetsEncrypt CA 4 https://bugs.webkit.org/show_bug.cgi?id=219274 5 6 Reviewed by Eric Carlson. 7 8 * Configurations/libwebrtc.iOS.exp: 9 * Configurations/libwebrtc.iOSsim.exp: 10 * Configurations/libwebrtc.mac.exp: 11 1 12 2020-12-04 Adam Roben <aroben@apple.com> 2 13 -
trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp
r269764 r270626 88 88 __ZN3rtc13SocketAddress5SetIPERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE 89 89 __ZNK3rtc9IPAddress12ipv4_addressEv 90 __ZNK3rtc9IPAddress8ToStringEv 90 91 __ZN3rtc7NetworkC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_RKNS_9IPAddressEiNS_11AdapterTypeE 91 92 __ZN3rtc7Network6SetIPsERKNSt3__16vectorINS_16InterfaceAddressENS1_9allocatorIS3_EEEEb -
trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp
r269764 r270626 88 88 __ZN3rtc13SocketAddress5SetIPERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE 89 89 __ZNK3rtc9IPAddress12ipv4_addressEv 90 __ZNK3rtc9IPAddress8ToStringEv 90 91 __ZN3rtc7NetworkC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_RKNS_9IPAddressEiNS_11AdapterTypeE 91 92 __ZN3rtc7Network6SetIPsERKNSt3__16vectorINS_16InterfaceAddressENS1_9allocatorIS3_EEEEb -
trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
r269764 r270626 88 88 __ZN3rtc13SocketAddress5SetIPERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE 89 89 __ZNK3rtc9IPAddress12ipv4_addressEv 90 __ZNK3rtc9IPAddress8ToStringEv 90 91 __ZN3rtc7NetworkC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_RKNS_9IPAddressEiNS_11AdapterTypeE 91 92 __ZN3rtc7Network6SetIPsERKNSt3__16vectorINS_16InterfaceAddressENS1_9allocatorIS3_EEEEb -
trunk/Source/WTF/ChangeLog
r270619 r270626 1 2020-12-10 Youenn Fablet <youenn@apple.com> 2 3 ICE does not resolve for `turns` relay candidates rooted in LetsEncrypt CA 4 https://bugs.webkit.org/show_bug.cgi?id=219274 5 6 Reviewed by Eric Carlson. 7 8 * Scripts/Preferences/WebPreferencesExperimental.yaml: 9 1 10 2020-12-10 Jiewen Tan <jiewen_tan@apple.com> 2 11 -
trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
r270613 r270626 1050 1050 default: WebKit::defaultWebRTCCodecsInGPUProcess() 1051 1051 1052 WebRTCPlatformSocketsEnabled: 1053 type: bool 1054 humanReadableName: "WebRTC Platform Sockets" 1055 humanReadableDescription: "Enable WebRTC Platform Sockets" 1056 webcoreBinding: RuntimeEnabledFeatures 1057 condition: ENABLE(WEB_RTC) 1058 defaultValue: 1059 WebKit: 1060 default: false 1061 1052 1062 WebRTCVP9Profile0CodecEnabled: 1053 1063 type: bool -
trunk/Source/WebCore/ChangeLog
r270625 r270626 1 2020-12-10 Youenn Fablet <youenn@apple.com> 2 3 ICE does not resolve for `turns` relay candidates rooted in LetsEncrypt CA 4 https://bugs.webkit.org/show_bug.cgi?id=219274 5 6 Reviewed by Eric Carlson. 7 8 Introduce a new runtime flag that is used to control whether using the new webrtc socket code path or not. 9 10 * page/RuntimeEnabledFeatures.h: 11 (WebCore::RuntimeEnabledFeatures::webRTCPlatformSocketsEnabled const): 12 (WebCore::RuntimeEnabledFeatures::setWebRTCPlatformSocketsEnabled): 13 1 14 2020-12-10 Aditya Keerthi <akeerthi@apple.com> 2 15 -
trunk/Source/WebCore/page/RuntimeEnabledFeatures.h
r270256 r270626 166 166 bool webRTCPlatformCodecsInGPUProcessEnabled() const { return m_isWebRTCPlatformCodecsInGPUProcessEnabled; } 167 167 void setWebRTCPlatformCodecsInGPUProcessEnabled(bool isEnabled) { m_isWebRTCPlatformCodecsInGPUProcessEnabled = isEnabled; } 168 bool webRTCPlatformSocketsEnabled() const { return m_isWebRTCPlatformSocketsEnabled; } 169 void setWebRTCPlatformSocketsEnabled(bool isEnabled) { m_isWebRTCPlatformSocketsEnabled = isEnabled; } 168 170 #endif 169 171 … … 318 320 bool m_isWebRTCVP9Profile2CodecEnabled { false }; 319 321 bool m_isWebRTCH264LowLatencyEncoderEnabled { false }; 322 bool m_isWebRTCPlatformSocketsEnabled { false }; 320 323 #endif 321 324 -
trunk/Source/WebKit/ChangeLog
r270621 r270626 1 2020-12-10 Youenn Fablet <youenn@apple.com> 2 3 ICE does not resolve for `turns` relay candidates rooted in LetsEncrypt CA 4 https://bugs.webkit.org/show_bug.cgi?id=219274 5 6 Reviewed by Eric Carlson. 7 8 Use NWConnection for client TCP sockets. 9 This allows piggy-backing on this API for things such as proxies or certificate validation. 10 Implementation does opening a TCP socket with TLS using NWConnection: 11 - If the socket is created for STUN/TURN, it is sending packets as is. For receiving data, the socket 12 will make sure to split received data in meaningful messages that WebProcess will process. 13 - If the socket is TCP for data, sent data is prefixed with the size of the data. For received data, 14 the length of the message is read and we wait to receive the whole message data to send it to WebProcess. 15 16 We enable that new code path based on an experimental feature. 17 Tested manually with TURNS servers and TCP-only connections. 18 19 * NetworkProcess/webrtc/NetworkRTCProvider.cpp: 20 (WebKit::NetworkRTCProvider::createClientTCPSocket): 21 * NetworkProcess/webrtc/NetworkRTCProvider.h: 22 (WebKit::NetworkRTCProvider::setPlatformSocketsEnabled): 23 * NetworkProcess/webrtc/NetworkRTCProvider.messages.in: 24 * NetworkProcess/webrtc/NetworkRTCSocketSocketCocoa.h: Added. 25 * NetworkProcess/webrtc/NetworkRTCSocketSocketCocoa.mm: Added. 26 (WebKit::socketQueue): 27 (WebKit::NetworkRTCSocketSocketCocoa::createClientTCPSocket): 28 (WebKit::isStunMessage): 29 (WebKit::getSTUNOrTURNMessageLength): 30 (WebKit::extractSTUNOrTURNMessages): 31 (WebKit::extractMessages): 32 (WebKit::processMessage): 33 (WebKit::NetworkRTCSocketSocketCocoa::NetworkRTCSocketSocketCocoa): 34 (WebKit::NetworkRTCSocketSocketCocoa::close): 35 (WebKit::NetworkRTCSocketSocketCocoa::setOption): 36 (WebKit::dataFromVector): 37 (WebKit::NetworkRTCSocketSocketCocoa::sendTo): 38 * SourcesCocoa.txt: 39 * WebKit.xcodeproj/project.pbxproj: 40 * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: 41 (WebKit::LibWebRTCSocketFactory::setConnection): 42 1 43 2020-12-10 Antoine Quint <graouts@webkit.org> 2 44 -
trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.cpp
r267143 r270626 47 47 #if PLATFORM(COCOA) 48 48 #include "NetworkRTCResolverCocoa.h" 49 #include "NetworkRTCSocketCocoa.h" 49 50 #endif 50 51 … … 176 177 } 177 178 callOnRTCNetworkThread([this, identifier, localAddress = RTCNetwork::isolatedCopy(localAddress.value), remoteAddress = RTCNetwork::isolatedCopy(remoteAddress.value), proxyInfo = proxyInfoFromSession(remoteAddress, *session), userAgent = WTFMove(userAgent).isolatedCopy(), options]() mutable { 179 #if PLATFORM(COCOA) 180 if (m_platformSocketsEnabled) { 181 if (auto socket = NetworkRTCSocketCocoa::createClientTCPSocket(identifier, *this, remoteAddress, options, m_ipcConnection.copyRef())) { 182 addSocket(identifier, WTFMove(socket)); 183 return; 184 } 185 } 186 #endif 178 187 rtc::PacketSocketTcpOptions tcpOptions; 179 188 tcpOptions.opts = options; … … 352 361 } 353 362 354 void NetworkRTCProvider::sendFromMainThread(Function<void(IPC::Connection&)>&& callback)355 {356 callOnMainThread([provider = makeRef(*this), callback = WTFMove(callback)]() {357 if (provider->m_connection)358 callback(provider->m_connection->connection());359 });360 }361 362 363 } // namespace WebKit 363 364 -
trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.h
r268423 r270626 88 88 89 89 void callOnRTCNetworkThread(Function<void()>&&); 90 void sendFromMainThread(Function<void(IPC::Connection&)>&&);91 90 92 91 void newConnection(Socket&, std::unique_ptr<rtc::AsyncPacketSocket>&&); … … 109 108 void closeSocket(WebCore::LibWebRTCSocketIdentifier); 110 109 void setSocketOption(WebCore::LibWebRTCSocketIdentifier, int option, int value); 110 void setPlatformSocketsEnabled(bool enabled) { m_platformSocketsEnabled = enabled; } 111 111 112 112 void createResolver(LibWebRTCResolverIdentifier, String&&); … … 138 138 bool m_isListeningSocketAuthorized { true }; 139 139 bool m_canLog { false }; 140 bool m_platformSocketsEnabled { false }; 140 141 }; 141 142 -
trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.messages.in
r263789 r270626 29 29 WrapNewTCPConnection(WebCore::LibWebRTCSocketIdentifier identifier, WebCore::LibWebRTCSocketIdentifier newConnectionSocketIdentifier) 30 30 31 void SetPlatformSocketsEnabled(bool enabled) 32 31 33 CreateResolver(WebKit::LibWebRTCResolverIdentifier identifier, String address) 32 34 StopResolver(WebKit::LibWebRTCResolverIdentifier identifier) -
trunk/Source/WebKit/SourcesCocoa.txt
r270616 r270626 55 55 NetworkProcess/webrtc/NetworkRTCResolver.cpp 56 56 NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp 57 NetworkProcess/webrtc/NetworkRTCSocketCocoa.mm 57 58 58 59 GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r270616 r270626 3532 3532 410482CB1DDD2FB500F006D0 /* RTCNetwork.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCNetwork.cpp; sourceTree = "<group>"; }; 3533 3533 410482CC1DDD2FB500F006D0 /* RTCNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCNetwork.h; sourceTree = "<group>"; }; 3534 410BA139257135F2002E2F8A /* NetworkRTCSocketCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkRTCSocketCocoa.mm; sourceTree = "<group>"; }; 3535 410BA13A257135F2002E2F8A /* NetworkRTCSocketCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkRTCSocketCocoa.h; sourceTree = "<group>"; }; 3534 3536 4111436320F677B10026F912 /* InjectUserScriptImmediately.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectUserScriptImmediately.h; sourceTree = "<group>"; }; 3535 3537 411286EF21C8A90C003A8550 /* MediaUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaUtilities.h; sourceTree = "<group>"; }; … … 7990 7992 4112B5471F9FD3AB00E67986 /* NetworkRTCResolverCocoa.cpp */, 7991 7993 4112B5481F9FD3AC00E67986 /* NetworkRTCResolverCocoa.h */, 7994 410BA13A257135F2002E2F8A /* NetworkRTCSocketCocoa.h */, 7995 410BA139257135F2002E2F8A /* NetworkRTCSocketCocoa.mm */, 7992 7996 ); 7993 7997 path = webrtc; -
trunk/Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp
r264665 r270626 34 34 #include "NetworkRTCProviderMessages.h" 35 35 #include "WebProcess.h" 36 #include <WebCore/RuntimeEnabledFeatures.h> 36 37 #include <wtf/MainThread.h> 37 38 … … 53 54 if (!m_connection) 54 55 return; 56 57 m_connection->send(Messages::NetworkRTCProvider::SetPlatformSocketsEnabled(RuntimeEnabledFeatures::sharedFeatures().webRTCPlatformSocketsEnabled()), 0); 55 58 56 59 while (!m_pendingMessageTasks.isEmpty())
Note: See TracChangeset
for help on using the changeset viewer.