Title: [282149] trunk
- Revision
- 282149
- Author
- you...@apple.com
- Date
- 2021-09-08 10:08:29 -0700 (Wed, 08 Sep 2021)
Log Message
webrtc/ephemeral-certificates-and-cnames.html needs to close its connections between two tests
https://bugs.webkit.org/show_bug.cgi?id=229931
Reviewed by Eric Carlson.
Source/WebCore:
Covered by updated test.
* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::addIceCandidate):
As per https://w3c.github.io/webrtc-pc/#dom-peerconnection-addicecandidate step 4.7, abort if peer connection is closed.
(WebCore::PeerConnectionBackend::newICECandidate):
As per https://w3c.github.io/webrtc-pc/#dfn-surface-the-candidate,
no need to fire an ICE candidate event if peer connection is closed.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addIceCandidate):
Return early if peer connection is closed as per https://w3c.github.io/webrtc-pc/#dom-peerconnection-addicecandidate.
LayoutTests:
* webrtc/ephemeral-certificates-and-cnames.html:
Close old connections so that we do not start adding ICE candidates from an old connection to a new one.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (282148 => 282149)
--- trunk/LayoutTests/ChangeLog 2021-09-08 16:46:44 UTC (rev 282148)
+++ trunk/LayoutTests/ChangeLog 2021-09-08 17:08:29 UTC (rev 282149)
@@ -1,3 +1,13 @@
+2021-09-08 Youenn Fablet <you...@apple.com>
+
+ webrtc/ephemeral-certificates-and-cnames.html needs to close its connections between two tests
+ https://bugs.webkit.org/show_bug.cgi?id=229931
+
+ Reviewed by Eric Carlson.
+
+ * webrtc/ephemeral-certificates-and-cnames.html:
+ Close old connections so that we do not start adding ICE candidates from an old connection to a new one.
+
2021-09-08 Arcady Goldmints-Orlov <agoldmi...@igalia.com>
[GLIB] Update test baselines after r282129
Modified: trunk/LayoutTests/webrtc/ephemeral-certificates-and-cnames.html (282148 => 282149)
--- trunk/LayoutTests/webrtc/ephemeral-certificates-and-cnames.html 2021-09-08 16:46:44 UTC (rev 282148)
+++ trunk/LayoutTests/webrtc/ephemeral-certificates-and-cnames.html 2021-09-08 17:08:29 UTC (rev 282149)
@@ -53,6 +53,7 @@
setTimeout(() => reject("Test timed out 1"), 2000);
});
}).then(() => {
+ closeConnections();
return navigator.mediaDevices.getUserMedia({ video: true, audio: true}).then((stream) => {
return new Promise((resolve, reject) => {
createConnections((firstConnection) => {
Modified: trunk/Source/WebCore/ChangeLog (282148 => 282149)
--- trunk/Source/WebCore/ChangeLog 2021-09-08 16:46:44 UTC (rev 282148)
+++ trunk/Source/WebCore/ChangeLog 2021-09-08 17:08:29 UTC (rev 282149)
@@ -1,3 +1,22 @@
+2021-09-08 Youenn Fablet <you...@apple.com>
+
+ webrtc/ephemeral-certificates-and-cnames.html needs to close its connections between two tests
+ https://bugs.webkit.org/show_bug.cgi?id=229931
+
+ Reviewed by Eric Carlson.
+
+ Covered by updated test.
+
+ * Modules/mediastream/PeerConnectionBackend.cpp:
+ (WebCore::PeerConnectionBackend::addIceCandidate):
+ As per https://w3c.github.io/webrtc-pc/#dom-peerconnection-addicecandidate step 4.7, abort if peer connection is closed.
+ (WebCore::PeerConnectionBackend::newICECandidate):
+ As per https://w3c.github.io/webrtc-pc/#dfn-surface-the-candidate,
+ no need to fire an ICE candidate event if peer connection is closed.
+ * Modules/mediastream/RTCPeerConnection.cpp:
+ (WebCore::RTCPeerConnection::addIceCandidate):
+ Return early if peer connection is closed as per https://w3c.github.io/webrtc-pc/#dom-peerconnection-addicecandidate.
+
2021-09-08 Simon Fraser <simon.fra...@apple.com>
Support percentages in the scale() transform functions, and the scale property
Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp (282148 => 282149)
--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp 2021-09-08 16:46:44 UTC (rev 282148)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp 2021-09-08 17:08:29 UTC (rev 282149)
@@ -308,7 +308,7 @@
doAddIceCandidate(*iceCandidate, [weakThis = makeWeakPtr(this), promise = WTFMove(promise)](auto&& result) mutable {
ASSERT(isMainThread());
- if (!weakThis)
+ if (!weakThis || weakThis->m_peerConnection.isClosed())
return;
RELEASE_LOG_ERROR(WebRTC, "Adding ice candidate finished, success=%d", result.hasException());
promise.settle(WTFMove(result));
@@ -348,6 +348,9 @@
void PeerConnectionBackend::newICECandidate(String&& sdp, String&& mid, unsigned short sdpMLineIndex, String&& serverURL)
{
m_peerConnection.doTask([logSiteIdentifier = LOGIDENTIFIER, this, sdp = WTFMove(sdp), mid = WTFMove(mid), sdpMLineIndex, serverURL = WTFMove(serverURL)]() mutable {
+ if (m_peerConnection.isClosed())
+ return;
+
UNUSED_PARAM(logSiteIdentifier);
ALWAYS_LOG(logSiteIdentifier, "Gathered ice candidate:", sdp);
m_finishedGatheringCandidates = false;
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (282148 => 282149)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2021-09-08 16:46:44 UTC (rev 282148)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2021-09-08 17:08:29 UTC (rev 282149)
@@ -325,10 +325,8 @@
return;
}
- if (isClosed()) {
- promise->reject(InvalidStateError);
+ if (isClosed())
return;
- }
ALWAYS_LOG(LOGIDENTIFIER, "Received ice candidate:\n", candidate ? candidate->candidate() : "null");
chainOperation(WTFMove(promise), [this, candidate = WTFMove(candidate)](auto&& promise) mutable {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes