Changeset 283307 in webkit
- Timestamp:
- Sep 30, 2021, 4:20:49 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/TestExpectations (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp (modified) (2 diffs)
-
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (modified) (2 diffs)
-
Source/WebCore/Modules/mediastream/RTCPeerConnection.h (modified) (1 diff)
-
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCIceTransportBackend.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r283303 r283307 1 2021-09-30 Youenn Fablet <youenn@apple.com> 2 3 Layout Test imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html is a flaky failure 4 https://bugs.webkit.org/show_bug.cgi?id=203256 5 <rdar://problem/56506063> 6 7 Reviewed by Eric Carlson. 8 9 * TestExpectations: 10 Mark webrtc/connection-state.html as flaky as it is probably too restrictive and should be reworked. 11 * platform/mac-wk2/TestExpectations: 12 Unflake test. 13 1 14 2021-09-29 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/LayoutTests/TestExpectations
r283279 r283307 2073 2073 webrtc/h264-baseline.html [ Slow ] 2074 2074 webrtc/h264-high.html [ Slow ] 2075 2076 webkit.org/b/207798 webrtc/connection-state.html [ Pass Failure ] 2075 2077 2076 2078 imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html [ Pass Failure Slow ] -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r283268 r283307 988 988 webkit.org/b/199089 [ Debug ] plugins/window-open.html [ Skip ] 989 989 990 # <rdar://problem/56506063> Layout Test imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html is a flaky failure (203256)991 webkit.org/b/203256 [ Debug ] imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html [ Pass Failure ]992 993 990 webkit.org/b/205808 fast/text/international/unicode-bidi-other-neutrals.html [ Pass Failure ] 994 991 … … 1033 1030 1034 1031 webkit.org/b/207796 [ Release ] fast/box-shadow/hidpi-box-shadow.html [ Pass ImageOnlyFailure ] 1035 1036 webkit.org/b/207798 webrtc/connection-state.html [ Pass Failure ]1037 1032 1038 1033 webkit.org/b/207938 http/wpt/crypto/derive-hmac-key-crash.any.html [ Pass Crash ] -
trunk/Source/WebCore/ChangeLog
r283306 r283307 1 2021-09-30 Youenn Fablet <youenn@apple.com> 2 3 Layout Test imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html is a flaky failure 4 https://bugs.webkit.org/show_bug.cgi?id=203256 5 <rdar://problem/56506063> 6 7 Reviewed by Eric Carlson. 8 9 Test was flaky for a few reasons: 10 - Setting local/remote descriptions may change the ICE transports in use so we need to update the ice connection state when setting local/remote descriptions. 11 - We start observing ICE transport backend state asynchronously and we might miss the checking state which can happen very quickly. Synthesize it if needed. 12 - We were using the ICE connection state value from the backend as well as computing it from our RTCIceTransport objects. We now fully compute it from RTCIceTransport objects. 13 This ensures we have consistent state between RTCIceTransport and RTCPeerConnection objects with regards to ICE state. 14 15 Covered by no longer flaky test. 16 17 * Modules/mediastream/PeerConnectionBackend.cpp: 18 (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded): 19 (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded): 20 * Modules/mediastream/RTCPeerConnection.cpp: 21 (WebCore::RTCPeerConnection::updateIceGatheringState): 22 (WebCore::RTCPeerConnection::updateIceConnectionState): 23 (WebCore::RTCPeerConnection::computeIceConnectionStateFromIceTransports): 24 * Modules/mediastream/RTCPeerConnection.h: 25 * Modules/mediastream/libwebrtc/LibWebRTCIceTransportBackend.cpp: 26 (WebCore::LibWebRTCIceTransportBackendObserver::start): 27 1 28 2021-09-30 Carlos Garcia Campos <cgarcia@igalia.com> 2 29 -
trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
r283028 r283307 178 178 m_peerConnection.updateTransceiversAfterSuccessfulLocalDescription(); 179 179 m_peerConnection.updateSctpBackend(WTFMove(sctpBackend)); 180 180 m_peerConnection.processIceTransportChanges(); 181 181 callback({ }); 182 182 }); … … 236 236 m_peerConnection.updateTransceiversAfterSuccessfulRemoteDescription(); 237 237 m_peerConnection.updateSctpBackend(WTFMove(sctpBackend)); 238 m_peerConnection.processIceTransportChanges(); 238 239 callback({ }); 239 240 }); -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
r282802 r283307 671 671 } 672 672 673 void RTCPeerConnection::updateIceConnectionState(RTCIceConnectionState newState) 674 { 675 ALWAYS_LOG(LOGIDENTIFIER, newState); 676 677 queueTaskKeepingObjectAlive(*this, TaskSource::Networking, [this, newState] { 678 if (isClosed() || m_iceConnectionState == newState) 673 void RTCPeerConnection::updateIceConnectionState(RTCIceConnectionState) 674 { 675 queueTaskKeepingObjectAlive(*this, TaskSource::Networking, [this] { 676 if (isClosed()) 677 return; 678 auto newState = computeIceConnectionStateFromIceTransports(); 679 if (m_iceConnectionState == newState) 679 680 return; 680 681 … … 792 793 } 793 794 795 void RTCPeerConnection::processIceTransportChanges() 796 { 797 auto newIceConnectionState = computeIceConnectionStateFromIceTransports(); 798 bool iceConnectionStateChanged = m_iceConnectionState != newIceConnectionState; 799 m_iceConnectionState = newIceConnectionState; 800 801 if (iceConnectionStateChanged && !isClosed()) 802 dispatchEvent(Event::create(eventNames().iceconnectionstatechangeEvent, Event::CanBubble::No, Event::IsCancelable::No)); 803 } 804 794 805 void RTCPeerConnection::updateNegotiationNeededFlag(std::optional<uint32_t> eventId) 795 806 { -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h
r282637 r283307 193 193 194 194 void processIceTransportStateChange(RTCIceTransport&); 195 void processIceTransportChanges(); 195 196 196 197 RTCSctpTransport* sctp() { return m_sctpTransport.get(); } -
trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCIceTransportBackend.cpp
r283186 r283307 109 109 internal->SignalIceTransportStateChanged.connect(this, &LibWebRTCIceTransportBackendObserver::onIceTransportStateChanged); 110 110 internal->SignalGatheringState.connect(this, &LibWebRTCIceTransportBackendObserver::onGatheringStateChanged); 111 callOnMainThread([protectedThis = Ref { *this }, transportState = internal->GetIceTransportState(), gatheringState = internal->gathering_state()] { 111 auto transportState = internal->GetIceTransportState(); 112 // We start observing a bit late and might miss the checking state. Synthesize it as needed. 113 if (transportState > webrtc::IceTransportState::kChecking && transportState != webrtc::IceTransportState::kClosed) { 114 callOnMainThread([protectedThis = Ref { *this }] { 115 if (protectedThis->m_client) 116 protectedThis->m_client->onStateChanged(RTCIceTransportState::Checking); 117 }); 118 } 119 callOnMainThread([protectedThis = Ref { *this }, transportState, gatheringState = internal->gathering_state()] { 112 120 if (!protectedThis->m_client) 113 121 return;
Note:
See TracChangeset
for help on using the changeset viewer.