Title: [282802] trunk
Revision
282802
Author
[email protected]
Date
2021-09-21 00:14:09 -0700 (Tue, 21 Sep 2021)

Log Message

Update list of WebRTC senders and receivers when updating local or remote descriptions
https://bugs.webkit.org/show_bug.cgi?id=230403

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/no-media-call.html:
Check that transport is not null after setting the local description.

Source/WebCore:

Senders and receivers are only updated when updating descriptions, call collectTransceivers at those points.
We do this just before updating sender/receiver transports, which allows to fix a bug in case senders/receivers are not surfaced through track events.

Covered by updated tests.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::getSenders const):
(WebCore::RTCPeerConnection::getReceivers const):
(WebCore::RTCPeerConnection::getTransceivers const):
(WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulLocalDescription):
(WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulRemoteDescription):

LayoutTests:

* platform/mac-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (282801 => 282802)


--- trunk/LayoutTests/ChangeLog	2021-09-21 07:08:56 UTC (rev 282801)
+++ trunk/LayoutTests/ChangeLog	2021-09-21 07:14:09 UTC (rev 282802)
@@ -1,3 +1,12 @@
+2021-09-21  Youenn Fablet  <[email protected]>
+
+        Update list of WebRTC senders and receivers when updating local or remote descriptions
+        https://bugs.webkit.org/show_bug.cgi?id=230403
+
+        Reviewed by Eric Carlson.
+
+        * platform/mac-wk2/TestExpectations:
+
 2021-09-20  Kimmo Kinnunen  <[email protected]>
 
         ANGLE Metal: single-component swizzles do not compile

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (282801 => 282802)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-21 07:08:56 UTC (rev 282801)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-21 07:14:09 UTC (rev 282802)
@@ -1,3 +1,13 @@
+2021-09-21  Youenn Fablet  <[email protected]>
+
+        Update list of WebRTC senders and receivers when updating local or remote descriptions
+        https://bugs.webkit.org/show_bug.cgi?id=230403
+
+        Reviewed by Eric Carlson.
+
+        * web-platform-tests/webrtc/no-media-call.html:
+        Check that transport is not null after setting the local description.
+
 2021-09-20  Nikos Mouchtaris  <[email protected]>
 
         Implement exp,log functions calc functions

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call.html (282801 => 282802)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call.html	2021-09-21 07:08:56 UTC (rev 282801)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/no-media-call.html	2021-09-21 07:14:09 UTC (rev 282802)
@@ -43,8 +43,10 @@
   };
 
   var _onAnswerCreated_ = test.step_func(function(answer) {
-    gSecondConnection.setLocalDescription(answer, ignoreSuccess,
-                                          failed('setLocalDescription second'));
+    gSecondConnection.setLocalDescription(answer, test.step_func(() => {
+        assert_equals(gSecondConnection.getSenders()[0], 1);
+        assert_not_equals(gSecondConnection.getSenders()[0].transport, null);
+    }), failed('setLocalDescription second'));
 
     // Similarly, this would go over the application's signaling solution.
     handleAnswer(answer.sdp);

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (282801 => 282802)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-09-21 07:08:56 UTC (rev 282801)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-09-21 07:14:09 UTC (rev 282802)
@@ -1502,8 +1502,6 @@
 
 webkit.org/b/226054 [ BigSur ] imported/w3c/web-platform-tests/webrtc/RTCRtpSender-encode-same-track-twice.https.html [ Pass Failure ]
 
-webkit.org/b/230157 imported/w3c/web-platform-tests/webrtc/no-media-call.html [ Pass Failure ]
-
 # rdar://80345048 ([ Monterey wk2 ] webrtc/h264-high.html is a constant timeout)
 [ Monterey ] webrtc/h264-high.html [ Timeout ]
 

Modified: trunk/Source/WebCore/ChangeLog (282801 => 282802)


--- trunk/Source/WebCore/ChangeLog	2021-09-21 07:08:56 UTC (rev 282801)
+++ trunk/Source/WebCore/ChangeLog	2021-09-21 07:14:09 UTC (rev 282802)
@@ -1,3 +1,22 @@
+2021-09-21  Youenn Fablet  <[email protected]>
+
+        Update list of WebRTC senders and receivers when updating local or remote descriptions
+        https://bugs.webkit.org/show_bug.cgi?id=230403
+
+        Reviewed by Eric Carlson.
+
+        Senders and receivers are only updated when updating descriptions, call collectTransceivers at those points.
+        We do this just before updating sender/receiver transports, which allows to fix a bug in case senders/receivers are not surfaced through track events.
+ 
+        Covered by updated tests.
+
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::getSenders const):
+        (WebCore::RTCPeerConnection::getReceivers const):
+        (WebCore::RTCPeerConnection::getTransceivers const):
+        (WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulLocalDescription):
+        (WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulRemoteDescription):
+
 2021-09-21  Ziran Sun  <[email protected]>
 
         [css-grid] FlexType is not applicable to min track sizing

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (282801 => 282802)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2021-09-21 07:08:56 UTC (rev 282801)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2021-09-21 07:14:09 UTC (rev 282802)
@@ -889,19 +889,16 @@
 
 Vector<std::reference_wrapper<RTCRtpSender>> RTCPeerConnection::getSenders() const
 {
-    m_backend->collectTransceivers();
     return m_transceiverSet.senders();
 }
 
 Vector<std::reference_wrapper<RTCRtpReceiver>> RTCPeerConnection::getReceivers() const
 {
-    m_backend->collectTransceivers();
     return m_transceiverSet.receivers();
 }
 
 const Vector<RefPtr<RTCRtpTransceiver>>& RTCPeerConnection::getTransceivers() const
 {
-    m_backend->collectTransceivers();
     return m_transceiverSet.list();
 }
 
@@ -1020,6 +1017,7 @@
 // https://w3c.github.io/webrtc-pc/#set-description step 4.9.1
 void RTCPeerConnection::updateTransceiversAfterSuccessfulLocalDescription()
 {
+    m_backend->collectTransceivers();
     updateTransceiverTransports();
 }
 
@@ -1026,6 +1024,7 @@
 // https://w3c.github.io/webrtc-pc/#set-description step 4.9.2
 void RTCPeerConnection::updateTransceiversAfterSuccessfulRemoteDescription()
 {
+    m_backend->collectTransceivers();
     updateTransceiverTransports();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to