Title: [229673] trunk/Source/WebCore
- Revision
- 229673
- Author
- you...@apple.com
- Date
- 2018-03-16 10:31:54 -0700 (Fri, 16 Mar 2018)
Log Message
IceCandidates leak on webrtc/datachannel/basic.html and other tests
https://bugs.webkit.org/show_bug.cgi?id=183676
<rdar://problem/36116228>
Reviewed by Eric Carlson.
Covered by manual testing using --leaks option on WK1.
WebKit should not release the candidates since libwebrtc is not taking ownership.
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::doSetLocalDescription):
(WebCore::LibWebRTCPeerConnectionBackend::doSetRemoteDescription):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (229672 => 229673)
--- trunk/Source/WebCore/ChangeLog 2018-03-16 17:14:12 UTC (rev 229672)
+++ trunk/Source/WebCore/ChangeLog 2018-03-16 17:31:54 UTC (rev 229673)
@@ -1,3 +1,18 @@
+2018-03-16 Youenn Fablet <you...@apple.com>
+
+ IceCandidates leak on webrtc/datachannel/basic.html and other tests
+ https://bugs.webkit.org/show_bug.cgi?id=183676
+ <rdar://problem/36116228>
+
+ Reviewed by Eric Carlson.
+
+ Covered by manual testing using --leaks option on WK1.
+ WebKit should not release the candidates since libwebrtc is not taking ownership.
+
+ * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
+ (WebCore::LibWebRTCPeerConnectionBackend::doSetLocalDescription):
+ (WebCore::LibWebRTCPeerConnectionBackend::doSetRemoteDescription):
+
2018-03-16 Zan Dobersek <zdober...@igalia.com>
[Nicosia] Add Cairo-specific GraphicsContext operation recorder
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp (229672 => 229673)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp 2018-03-16 17:14:12 UTC (rev 229672)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp 2018-03-16 17:31:54 UTC (rev 229673)
@@ -150,8 +150,9 @@
m_endpoint->doSetLocalDescription(description);
if (!m_isLocalDescriptionSet) {
if (m_isRemoteDescriptionSet) {
- while (m_pendingCandidates.size())
- m_endpoint->addIceCandidate(*m_pendingCandidates.takeLast().release());
+ for (auto& candidate : m_pendingCandidates)
+ m_endpoint->addIceCandidate(*candidate);
+ m_pendingCandidates.clear();
}
m_isLocalDescriptionSet = true;
}
@@ -162,8 +163,8 @@
m_endpoint->doSetRemoteDescription(description);
if (!m_isRemoteDescriptionSet) {
if (m_isLocalDescriptionSet) {
- while (m_pendingCandidates.size())
- m_endpoint->addIceCandidate(*m_pendingCandidates.takeLast().release());
+ for (auto& candidate : m_pendingCandidates)
+ m_endpoint->addIceCandidate(*candidate);
}
m_isRemoteDescriptionSet = true;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes