tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 27fe3d48f511e2dd708e687836ece8d357c9dceb
parent 58196f6ea378ce792a89dd58659537159554512c
Author: Dan Baker <dbaker@mozilla.com>
Date:   Mon,  1 Dec 2025 19:53:38 -0700

Bug 2000941 - Vendor libwebrtc from 5efb280e2b

Upstream commit: https://webrtc.googlesource.com/src/+/5efb280e2b5d7774086b085b7d4eb1fbb93bfa7e
    Reland "Mark deprecated features with [[deprecated]]"

    This reverts commit 7e1a12d6ff7f13fce22e6284abbdc9412cf4ed47.

    Reason for revert: Removed the problematic deprecation

    Original change's description:
    > Revert "Mark deprecated features with [[deprecated]]"
    >
    > This reverts commit 3cf5dc1bece892a9c6e359bfa9931a88f896df12.
    >
    > Reason for revert: Broke downstream project (Nearby)
    >
    > Original change's description:
    > > Mark deprecated features with [[deprecated]]
    > >
    > > This was the result of asking Gemini
    > > "Consider the interfaces in @api. There are comments that indicate that certain methods are deprecated, but the methods don't have [[deprecated]] on them. Make a CL that adds [[deprecated]] to those methods"
    > >
    > > followed by a few rounds of reverting and working around errors.
    > >
    > > Bug: None
    > > Change-Id: I5d7b1f89fff01277ce96e940aa7340cdfcb728cc
    > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/407441
    > > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
    > > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    > > Cr-Commit-Position: refs/heads/main@{#45623}
    >
    > Bug: None
    > No-Presubmit: true
    > No-Tree-Checks: true
    > No-Try: true
    > Change-Id: Ib5c58e36e94b915a01514455c8a2ad561b61a5c9
    > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/409000
    > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    > Cr-Commit-Position: refs/heads/main@{#45629}

    Bug: None
    Change-Id: If8a4e8d6ec5455d892eb3fbb3243417e1a1712b9
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/408942
    Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45632}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/api/audio/audio_processing_statistics.cc | 5+++++
Mthird_party/libwebrtc/api/audio/audio_processing_statistics.h | 5++++-
Mthird_party/libwebrtc/api/call/bitrate_allocation.h | 1+
Mthird_party/libwebrtc/api/candidate.cc | 5+++++
Mthird_party/libwebrtc/api/candidate.h | 4+---
Mthird_party/libwebrtc/api/data_channel_interface.h | 5++++-
Mthird_party/libwebrtc/api/dtls_transport_interface.h | 15++++++++-------
Mthird_party/libwebrtc/api/dtmf_sender_interface.h | 3++-
Mthird_party/libwebrtc/api/jsep.h | 1-
Mthird_party/libwebrtc/api/peer_connection_interface.h | 4++--
Mthird_party/libwebrtc/api/rtp_receiver_interface.h | 5++---
Mthird_party/libwebrtc/api/rtp_sender_interface.h | 5++---
Mthird_party/libwebrtc/api/uma_metrics.h | 2+-
Mthird_party/libwebrtc/modules/audio_processing/audio_processing_unittest.cc | 3+++
Mthird_party/libwebrtc/modules/audio_processing/include/audio_frame_proxies.cc | 4++++
Mthird_party/libwebrtc/moz-patch-stack/s0027.patch | 2+-
Mthird_party/libwebrtc/pc/data_channel_unittest.cc | 3+++
Mthird_party/libwebrtc/pc/dtmf_sender.cc | 6++++++
Mthird_party/libwebrtc/pc/dtmf_sender_unittest.cc | 2--
Mthird_party/libwebrtc/pc/peer_connection_integrationtest.cc | 3+++
Mthird_party/libwebrtc/pc/sctp_data_channel.cc | 3+++
Mthird_party/libwebrtc/sdk/objc/unittests/RTCIceCandidateTest.mm | 3+--
23 files changed, 63 insertions(+), 30 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-12-02T02:50:51.570071+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T02:53:17.333192+00:00. # base of lastest vendoring -e5e553f078 +5efb280e2b diff --git a/third_party/libwebrtc/api/audio/audio_processing_statistics.cc b/third_party/libwebrtc/api/audio/audio_processing_statistics.cc @@ -14,8 +14,13 @@ namespace webrtc { AudioProcessingStats::AudioProcessingStats() = default; +// TODO: https://issues.webrtc.org/42221314 - remove pragma when deprecated +// field `voice_detected` is removed. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" AudioProcessingStats::AudioProcessingStats(const AudioProcessingStats& other) = default; +#pragma clang diagnostic pop AudioProcessingStats::~AudioProcessingStats() = default; diff --git a/third_party/libwebrtc/api/audio/audio_processing_statistics.h b/third_party/libwebrtc/api/audio/audio_processing_statistics.h @@ -20,6 +20,8 @@ namespace webrtc { // This version of the stats uses Optionals, it will replace the regular // AudioProcessingStatistics struct. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" struct RTC_EXPORT AudioProcessingStats { AudioProcessingStats(); AudioProcessingStats(const AudioProcessingStats& other); @@ -31,7 +33,7 @@ struct RTC_EXPORT AudioProcessingStats { // It is conservative in flagging audio as speech, with low likelihood of // incorrectly flagging a frame as voice. // Only reported if voice detection is enabled in AudioProcessing::Config. - std::optional<bool> voice_detected; + [[deprecated("bugs.webrtc.org/11226")]] std::optional<bool> voice_detected; // AEC Statistics. // ERL = 10log_10(P_far / P_echo) @@ -62,6 +64,7 @@ struct RTC_EXPORT AudioProcessingStats { // call to `GetStatistics()`. std::optional<int32_t> delay_ms; }; +#pragma clang diagnostic pop } // namespace webrtc diff --git a/third_party/libwebrtc/api/call/bitrate_allocation.h b/third_party/libwebrtc/api/call/bitrate_allocation.h @@ -28,6 +28,7 @@ struct BitrateAllocationUpdate { // Predicted round trip time. TimeDelta round_trip_time = TimeDelta::PlusInfinity(); // `bwe_period` is deprecated. + // TODO: https://issues.webrtc.org/442860748 - complete removal. TimeDelta bwe_period = TimeDelta::PlusInfinity(); // Congestion window pushback bitrate reduction fraction. Used in // VideoStreamEncoder to reduce the bitrate by the given fraction diff --git a/third_party/libwebrtc/api/candidate.cc b/third_party/libwebrtc/api/candidate.cc @@ -196,6 +196,11 @@ bool Candidate::operator!=(const Candidate& o) const { } Candidate Candidate::ToSanitizedCopy(bool use_hostname_address, + bool filter_related_address) const { + return ToSanitizedCopy(use_hostname_address, filter_related_address, false); +} + +Candidate Candidate::ToSanitizedCopy(bool use_hostname_address, bool filter_related_address, bool filter_ufrag) const { Candidate copy(*this); diff --git a/third_party/libwebrtc/api/candidate.h b/third_party/libwebrtc/api/candidate.h @@ -236,9 +236,7 @@ class RTC_EXPORT Candidate { // any remote ice parameters have been set. [[deprecated("Use variant with filter_ufrag")]] Candidate ToSanitizedCopy( bool use_hostname_address, - bool filter_related_address) const { - return ToSanitizedCopy(use_hostname_address, filter_related_address, false); - } + bool filter_related_address) const; Candidate ToSanitizedCopy(bool use_hostname_address, bool filter_related_address, bool filter_ufrag) const; diff --git a/third_party/libwebrtc/api/data_channel_interface.h b/third_party/libwebrtc/api/data_channel_interface.h @@ -32,10 +32,12 @@ namespace webrtc { // C++ version of: https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelinit // TODO(deadbeef): Use std::optional for the "-1 if unset" things. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" struct DataChannelInit { // Deprecated. Reliability is assumed, and channel will be unreliable if // maxRetransmitTime or MaxRetransmits is set. - bool reliable = false; + [[deprecated]] bool reliable = false; // True if ordered delivery is required. bool ordered = true; @@ -69,6 +71,7 @@ struct DataChannelInit { // https://w3c.github.io/webrtc-priority/#new-rtcdatachannelinit-member std::optional<PriorityValue> priority; }; +#pragma clang diagnostic pop // At the JavaScript level, data can be passed in as a string or a blob, so // this structure's `binary` flag tells whether the data should be interpreted diff --git a/third_party/libwebrtc/api/dtls_transport_interface.h b/third_party/libwebrtc/api/dtls_transport_interface.h @@ -55,13 +55,14 @@ class RTC_EXPORT DtlsTransportInformation { std::optional<int> srtp_cipher_suite, std::unique_ptr<SSLCertChain> remote_ssl_certificates, std::optional<int> ssl_group_id); - ABSL_DEPRECATED("Use version with role parameter") - DtlsTransportInformation( - DtlsTransportState state, - std::optional<int> tls_version, - std::optional<int> ssl_cipher_suite, - std::optional<int> srtp_cipher_suite, - std::unique_ptr<SSLCertChain> remote_ssl_certificates); + [[deprecated("Use version with role parameter")]] ABSL_DEPRECATED( + "Use version with role parameter") + DtlsTransportInformation( + DtlsTransportState state, + std::optional<int> tls_version, + std::optional<int> ssl_cipher_suite, + std::optional<int> srtp_cipher_suite, + std::unique_ptr<SSLCertChain> remote_ssl_certificates); // Copy and assign DtlsTransportInformation(const DtlsTransportInformation& c); diff --git a/third_party/libwebrtc/api/dtmf_sender_interface.h b/third_party/libwebrtc/api/dtmf_sender_interface.h @@ -32,7 +32,8 @@ class DtmfSenderObserverInterface { // DEPRECATED: Older API without tone buffer. // TODO(bugs.webrtc.org/9725): Remove old API and default implementation // when old callers are gone. - virtual void OnToneChange(const std::string& /* tone */) {} + [[deprecated("Use OnToneChange with tone_buffer")]] virtual void OnToneChange( + const std::string& /* tone */) {} protected: virtual ~DtmfSenderObserverInterface() = default; diff --git a/third_party/libwebrtc/api/jsep.h b/third_party/libwebrtc/api/jsep.h @@ -89,7 +89,6 @@ class RTC_EXPORT IceCandidate final { std::string ToString() const; // TODO: webrtc:406795492 - Deprecate and remove this method. - // [[deprecated("Use ToString()")]] bool ToString(std::string* out) const { if (!out) return false; diff --git a/third_party/libwebrtc/api/peer_connection_interface.h b/third_party/libwebrtc/api/peer_connection_interface.h @@ -1132,8 +1132,8 @@ class RTC_EXPORT PeerConnectionInterface : public RefCountInterface { // to the MID of the m= section that generated the candidate. // TODO(bugs.webrtc.org/8395): Use IceCandidate instead of // Candidate, which would avoid the transport_name oddity. - [[deprecated("Use IceCandidate version")]] - virtual bool RemoveIceCandidates(const std::vector<Candidate>& candidates); + [[deprecated("Use IceCandidate version")]] virtual bool RemoveIceCandidates( + const std::vector<Candidate>& candidates); // SetBitrate limits the bandwidth allocated for all RTP streams sent by // this PeerConnection. Other limitations might affect these limits and diff --git a/third_party/libwebrtc/api/rtp_receiver_interface.h b/third_party/libwebrtc/api/rtp_receiver_interface.h @@ -116,9 +116,8 @@ class RTC_EXPORT RtpReceiverInterface : public RefCountInterface, // Sets a frame transformer between the depacketizer and the decoder to enable // client code to transform received frames according to their own processing // logic. - // TODO: bugs.webrtc.org/15929 - add [[deprecated("Use SetFrameTransformer")]] - // when usage in Chrome is removed - virtual void SetDepacketizerToDecoderFrameTransformer( + [[deprecated("Use SetFrameTransformer")]] virtual void + SetDepacketizerToDecoderFrameTransformer( scoped_refptr<FrameTransformerInterface> frame_transformer) { SetFrameTransformer(std::move(frame_transformer)); } diff --git a/third_party/libwebrtc/api/rtp_sender_interface.h b/third_party/libwebrtc/api/rtp_sender_interface.h @@ -118,9 +118,8 @@ class RTC_EXPORT RtpSenderInterface : public RefCountInterface, // user. This can be used to update the state of the object. virtual scoped_refptr<FrameEncryptorInterface> GetFrameEncryptor() const = 0; - // TODO: bugs.webrtc.org/15929 - add [[deprecated("Use SetFrameTransformer")]] - // when usage in Chrome is removed - virtual void SetEncoderToPacketizerFrameTransformer( + [[deprecated("Use SetFrameTransformer")]] virtual void + SetEncoderToPacketizerFrameTransformer( scoped_refptr<FrameTransformerInterface> frame_transformer) { SetFrameTransformer(std::move(frame_transformer)); } diff --git a/third_party/libwebrtc/api/uma_metrics.h b/third_party/libwebrtc/api/uma_metrics.h @@ -48,7 +48,7 @@ enum PeerConnectionMetricsName { enum IceCandidatePairType { // HostHost is deprecated. It was replaced with the set of types at the bottom // to report private or public host IP address. - kIceCandidatePairHostHost = 0, + kIceCandidatePairHostHost [[deprecated]] = 0, kIceCandidatePairHostSrflx = 1, kIceCandidatePairHostRelay = 2, kIceCandidatePairHostPrflx = 3, diff --git a/third_party/libwebrtc/modules/audio_processing/audio_processing_unittest.cc b/third_party/libwebrtc/modules/audio_processing/audio_processing_unittest.cc @@ -2875,7 +2875,10 @@ TEST(ApmStatistics, DoNotReportVoiceDetectedStat) { StreamConfig(frame.sample_rate_hz, frame.num_channels()), frame.data.data()), 0); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" EXPECT_FALSE(apm->GetStatistics().voice_detected.has_value()); +#pragma clang diagnostic pop } TEST(ApmStatistics, GetStatisticsReportsNoEchoDetectorStatsWhenDisabled) { diff --git a/third_party/libwebrtc/modules/audio_processing/include/audio_frame_proxies.cc b/third_party/libwebrtc/modules/audio_processing/include/audio_frame_proxies.cc @@ -31,11 +31,15 @@ int ProcessAudioFrame(AudioProcessing* ap, AudioFrame* frame) { AudioProcessingStats stats = ap->GetStatistics(); + // TODO: https://issues.webrtc.org/42221314 - remove when deleted +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" if (stats.voice_detected) { frame->vad_activity_ = *stats.voice_detected ? AudioFrame::VADActivity::kVadActive : AudioFrame::VADActivity::kVadPassive; } +#pragma clang diagnostic pop return result; } diff --git a/third_party/libwebrtc/moz-patch-stack/s0027.patch b/third_party/libwebrtc/moz-patch-stack/s0027.patch @@ -344,7 +344,7 @@ index 47f3e23450..462739dea8 100644 rtc_library("neteq_simulator_api") { visibility = [ "*" ] diff --git a/api/rtp_sender_interface.h b/api/rtp_sender_interface.h -index 2a7907dc4e..18d27b2499 100644 +index db04b9580c..56030c1b33 100644 --- a/api/rtp_sender_interface.h +++ b/api/rtp_sender_interface.h @@ -34,6 +34,8 @@ diff --git a/third_party/libwebrtc/pc/data_channel_unittest.cc b/third_party/libwebrtc/pc/data_channel_unittest.cc @@ -164,8 +164,11 @@ TEST_F(SctpDataChannelTest, VerifyConfigurationGetters) { // Note that the `init_.reliable` field is deprecated, so we directly set // it here to match spec behavior for purposes of checking the `reliable()` // getter. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" init_.reliable = (!init_.maxRetransmits && !init_.maxRetransmitTime); EXPECT_EQ(channel_->reliable(), init_.reliable); +#pragma clang diagnostic pop EXPECT_EQ(channel_->ordered(), init_.ordered); EXPECT_EQ(channel_->negotiated(), init_.negotiated); EXPECT_EQ(channel_->priority(), PriorityValue(Priority::kLow)); diff --git a/third_party/libwebrtc/pc/dtmf_sender.cc b/third_party/libwebrtc/pc/dtmf_sender.cc @@ -191,7 +191,10 @@ void DtmfSender::DoInsertDtmf() { // Fire a “OnToneChange” event with an empty string and stop. if (observer_) { observer_->OnToneChange(std::string(), tones_); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" observer_->OnToneChange(std::string()); +#pragma clang diagnostic pop } return; } else { @@ -229,7 +232,10 @@ void DtmfSender::DoInsertDtmf() { if (observer_) { observer_->OnToneChange(tones_.substr(first_tone_pos, 1), tones_.substr(first_tone_pos + 1)); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" observer_->OnToneChange(tones_.substr(first_tone_pos, 1)); +#pragma clang diagnostic pop } // Erase the unrecognized characters plus the tone that's just processed. diff --git a/third_party/libwebrtc/pc/dtmf_sender_unittest.cc b/third_party/libwebrtc/pc/dtmf_sender_unittest.cc @@ -200,8 +200,6 @@ class DtmfSenderTest : public ::testing::Test { const std::vector<std::string>& tones = observer_->tones(); // The observer will get an empty string at the end. EXPECT_EQ(tones_ref.size() + 1, tones.size()); - EXPECT_EQ(observer_->tones(), - observer_->tones_from_single_argument_callback()); EXPECT_TRUE(tones.back().empty()); EXPECT_TRUE(observer_->tones_remaining().empty()); std::string::const_iterator it_ref = tones_ref.begin(); diff --git a/third_party/libwebrtc/pc/peer_connection_integrationtest.cc b/third_party/libwebrtc/pc/peer_connection_integrationtest.cc @@ -2136,9 +2136,12 @@ TEST_P(PeerConnectionIntegrationIceStatesTest, MAYBE_VerifyBestConnection) { EXPECT_METRIC_EQ(0, num_best_ipv6); } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" EXPECT_METRIC_EQ( 0, metrics::NumEvents("WebRTC.PeerConnection.CandidatePairType_UDP", kIceCandidatePairHostHost)); +#pragma clang diagnostic pop EXPECT_METRIC_EQ( 1, metrics::NumEvents("WebRTC.PeerConnection.CandidatePairType_UDP", kIceCandidatePairHostPublicHostPublic)); diff --git a/third_party/libwebrtc/pc/sctp_data_channel.cc b/third_party/libwebrtc/pc/sctp_data_channel.cc @@ -84,8 +84,11 @@ BYPASS_PROXY_METHOD2(void, END_PROXY_MAP(DataChannel) } // namespace +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" InternalDataChannelInit::InternalDataChannelInit(const DataChannelInit& base) : DataChannelInit(base), open_handshake_role(kOpener) { +#pragma clang diagnostic pop // If the channel is externally negotiated, do not send the OPEN message. if (base.negotiated) { open_handshake_role = kNone; diff --git a/third_party/libwebrtc/sdk/objc/unittests/RTCIceCandidateTest.mm b/third_party/libwebrtc/sdk/objc/unittests/RTCIceCandidateTest.mm @@ -39,8 +39,7 @@ EXPECT_EQ("audio", nativeCandidate->sdp_mid()); EXPECT_EQ(0, nativeCandidate->sdp_mline_index()); - std::string sdpString; - nativeCandidate->ToString(&sdpString); + std::string sdpString = nativeCandidate->ToString(); EXPECT_EQ(sdp.stdString, sdpString); }