tor-browser

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

commit 4303190a3e72e378ac51d0c4fd4f1fe308ff58d2
parent 8369fd9cccf87e48fd0133173d709b7013ea8085
Author: Dan Baker <dbaker@mozilla.com>
Date:   Wed, 22 Oct 2025 14:26:08 -0600

Bug 1995393 - Vendor libwebrtc from 96ac10a214

Upstream commit: https://webrtc.googlesource.com/src/+/96ac10a214b688d79fbf5b9bee865a4a22ac50a1
    Dont require CCFB on none RTP m lines.

    Bug: webrtc:436452760
    Change-Id: I609355595cef755f2fa341298e9db0fb1ec67b02
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/403261
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Per Kjellander <perkj@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45297}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/pc/congestion_control_integrationtest.cc | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Mthird_party/libwebrtc/pc/media_session.cc | 3+++
3 files changed, 57 insertions(+), 2 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-22T20:23:37.117654+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-22T20:25:53.207981+00:00. # base of lastest vendoring -15152cd778 +96ac10a214 diff --git a/third_party/libwebrtc/pc/congestion_control_integrationtest.cc b/third_party/libwebrtc/pc/congestion_control_integrationtest.cc @@ -22,6 +22,7 @@ #include "api/rtp_parameters.h" #include "api/rtp_transceiver_direction.h" #include "api/test/rtc_error_matchers.h" +#include "pc/session_description.h" #include "pc/test/integration_test_helpers.h" #include "test/gmock.h" #include "test/gtest.h" @@ -121,6 +122,57 @@ TEST_F(PeerConnectionCongestionControlTest, SendOnlySupportDoesNotEnableCcFb) { EXPECT_THAT(answer_str, HasSubstr("transport-cc")); } +#ifdef WEBRTC_HAVE_SCTP +TEST_F(PeerConnectionCongestionControlTest, + ReceiveOfferWithDataChannelsSetsCcfbFlag) { + SetFieldTrials("WebRTC-RFC8888CongestionControlFeedback/Enabled/"); + ASSERT_TRUE(CreatePeerConnectionWrappers()); + ConnectFakeSignalingForSdpOnly(); + caller()->AddAudioVideoTracks(); + caller()->CreateDataChannel(); + callee()->CreateDataChannel(); + caller()->CreateAndSetAndSignalOffer(); + ASSERT_THAT(WaitUntil([&] { return SignalingStateStable(); }, IsTrue()), + IsRtcOk()); + { + // Check that the callee parsed it. + auto parsed_contents = + callee()->pc()->remote_description()->description()->contents(); + EXPECT_FALSE(parsed_contents.empty()); + bool has_data_channel = false; + for (const auto& content : parsed_contents) { + if (content.type == MediaProtocolType::kSctp) { + EXPECT_FALSE(content.media_description()->rtcp_fb_ack_ccfb()); + has_data_channel = true; + } else { + EXPECT_TRUE(content.media_description()->rtcp_fb_ack_ccfb()); + } + } + ASSERT_TRUE(has_data_channel); + } + + { + // Check that the caller also parsed the answer. + auto parsed_contents = + caller()->pc()->remote_description()->description()->contents(); + EXPECT_FALSE(parsed_contents.empty()); + bool has_data_channel = false; + for (const auto& content : parsed_contents) { + if (content.type == MediaProtocolType::kSctp) { + EXPECT_FALSE(content.media_description()->rtcp_fb_ack_ccfb()); + has_data_channel = true; + } else { + EXPECT_TRUE(content.media_description()->rtcp_fb_ack_ccfb()); + } + } + ASSERT_TRUE(has_data_channel); + } + // Check that the answer does not contain transport-cc + std::string answer_str = absl::StrCat(*caller()->pc()->remote_description()); + EXPECT_THAT(answer_str, Not(HasSubstr("transport-cc"))); +} +#endif + TEST_F(PeerConnectionCongestionControlTest, NegotiatingCcfbRemovesTsn) { SetFieldTrials("WebRTC-RFC8888CongestionControlFeedback/Enabled/"); ASSERT_TRUE(CreatePeerConnectionWrappers()); diff --git a/third_party/libwebrtc/pc/media_session.cc b/third_party/libwebrtc/pc/media_session.cc @@ -847,6 +847,9 @@ MediaSessionDescriptionFactory::CreateAnswerOrError( if (transport_desc_factory_->trials().IsEnabled( "WebRTC-RFC8888CongestionControlFeedback")) { for (const auto& content : offer->contents()) { + if (content.type != MediaProtocolType::kRtp) { + continue; + } if (content.media_description()->rtcp_fb_ack_ccfb()) { has_ack_ccfb = true; } else if (has_ack_ccfb) {