commit 98ed7ddd62131f52137902a64e5338bce14b9a77
parent a33b13c9243be4f4c4797c94126a4d37a97067e8
Author: Dan Baker <dbaker@mozilla.com>
Date: Thu, 23 Oct 2025 16:37:14 -0600
Bug 1995393 - Vendor libwebrtc from 008a11c2cf
Upstream commit: https://webrtc.googlesource.com/src/+/008a11c2cf0613274da692f38d67cc2e1700f21c
Mark Candidate::transport_name() property as deprecated
Also mark SdpDeserializeCandidate as deprecated and remove usage of it
from webrtc.
Bug: webrtc:42233526
Change-Id: I727332fe0c61c9d4ff4620ba3d8b19644deae5f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/402100
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45360}
Diffstat:
7 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T22:34:34.074018+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T22:37:02.391532+00:00.
# base of lastest vendoring
-771386d09d
+008a11c2cf
diff --git a/third_party/libwebrtc/api/candidate.h b/third_party/libwebrtc/api/candidate.h
@@ -192,8 +192,12 @@ class RTC_EXPORT Candidate {
void set_tcptype(absl::string_view tcptype) { Assign(tcptype_, tcptype); }
// The name of the transport channel of this candidate.
- // TODO(phoglund): remove.
- const std::string& transport_name() const { return transport_name_; }
+ // TODO(bugs.webrtc.org/42233526): remove.
+ [[deprecated("Use IceCandidate::sdp_mid")]]
+ const std::string& transport_name() const {
+ return transport_name_;
+ }
+ [[deprecated("Use the IceCandidate type for sdp_mid")]]
void set_transport_name(absl::string_view transport_name) {
Assign(transport_name_, transport_name);
}
diff --git a/third_party/libwebrtc/pc/jsep_ice_candidate.cc b/third_party/libwebrtc/pc/jsep_ice_candidate.cc
@@ -52,9 +52,17 @@ std::unique_ptr<IceCandidate> IceCandidate::Create(absl::string_view mid,
SdpParseError* absl_nullable
error /*= nullptr*/) {
Candidate candidate;
- if (!SdpDeserializeCandidate(mid, sdp, &candidate, error)) {
+ if (!ParseCandidate(sdp, &candidate, error, true)) {
return nullptr;
}
+ // TODO(bugs.webrtc.org/42233526): The Candidate::transport_name() property
+ // has been deprecated. At this level, the mid is already a property of
+ // IceCandidate and reduntant for Candidate. Remove this when removing
+ // Candidate::transport_name().
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ candidate.set_transport_name(mid);
+#pragma clang diagnostic pop
return std::make_unique<IceCandidate>(mid, sdp_mline_index, candidate);
}
diff --git a/third_party/libwebrtc/pc/peer_connection.cc b/third_party/libwebrtc/pc/peer_connection.cc
@@ -2084,7 +2084,10 @@ void PeerConnection::OnIceCandidatesRemoved(
for (Candidate candidate : candidates) { // Get a copy to set the transport.
// For backwards compatibility reasons, all candidate instances still need
// to have the transport_name() property set to the `mid`.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
candidate.set_transport_name(mid);
+#pragma clang diagnostic pop
IceCandidate c(mid, -1, candidate);
RunWithObserver([&](auto o) { o->OnIceCandidateRemoved(&c); });
}
diff --git a/third_party/libwebrtc/pc/sdp_offer_answer.cc b/third_party/libwebrtc/pc/sdp_offer_answer.cc
@@ -3007,7 +3007,10 @@ bool SdpOfferAnswerHandler::RemoveIceCandidates(
RTC_DCHECK_RUN_ON(signaling_thread());
for (const auto& c : candidates) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
IceCandidate candidate(c.transport_name(), /*sdp_mline_index=*/-1, c);
+#pragma clang diagnostic pop
if (!RemoveIceCandidate(&candidate)) {
RTC_LOG(LS_ERROR) << "RemoveIceCandidates: Failed to remove candidate: "
<< c.ToSensitiveString();
diff --git a/third_party/libwebrtc/pc/webrtc_sdp.cc b/third_party/libwebrtc/pc/webrtc_sdp.cc
@@ -3372,7 +3372,10 @@ bool SdpDeserializeCandidate(absl::string_view transport_name,
if (!ParseCandidate(message, candidate, error, true)) {
return false;
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
candidate->set_transport_name(transport_name);
+#pragma clang diagnostic pop
return true;
}
diff --git a/third_party/libwebrtc/pc/webrtc_sdp.h b/third_party/libwebrtc/pc/webrtc_sdp.h
@@ -66,6 +66,8 @@ bool SdpDeserialize(absl::string_view message,
// candidate - The cricket Candidate from the SDP string.
// error - The detail error information when parsing fails.
// return - true on success, false on failure.
+// TODO(bugs.webrtc.org/42233526): Remove.
+[[deprecated("Use IceCandidate::Create instead.")]]
RTC_EXPORT bool SdpDeserializeCandidate(absl::string_view transport_name,
absl::string_view message,
Candidate* candidate,