tor-browser

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

commit c34bf72d925b11d3d39382d93e1b5fd5d76f56c3
parent f6c7777d4b7e47a702ca97235d6843b10801e76e
Author: Dan Baker <dbaker@mozilla.com>
Date:   Wed, 22 Oct 2025 13:56:27 -0600

Bug 1995393 - Vendor libwebrtc from 83740a071e

Upstream commit: https://webrtc.googlesource.com/src/+/83740a071e6951cdf7ddb6b2ea35d80083f3eb51
    Don't delete transport-cc if ccfb is disabled.

    This issue would trigger if CCFB was enabled on the sender side
    but not on the receiver side.

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

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/pc/congestion_control_integrationtest.cc | 36++++++++++++++++++++++++++++++++++++
Mthird_party/libwebrtc/pc/media_session.cc | 12+++++++-----
3 files changed, 45 insertions(+), 7 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-22T19:54:03.757577+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-22T19:56:14.992285+00:00. # base of lastest vendoring -d22c6e6cb9 +83740a071e diff --git a/third_party/libwebrtc/pc/congestion_control_integrationtest.cc b/third_party/libwebrtc/pc/congestion_control_integrationtest.cc @@ -85,6 +85,42 @@ TEST_F(PeerConnectionCongestionControlTest, ReceiveOfferSetsCcfbFlag) { EXPECT_THAT(answer_str, Not(HasSubstr("transport-cc"))); } +TEST_F(PeerConnectionCongestionControlTest, SendOnlySupportDoesNotEnableCcFb) { + // Enable CCFB for sender, do not enable it for receiver + SetFieldTrials(kCallerName, + "WebRTC-RFC8888CongestionControlFeedback/Enabled/"); + SetFieldTrials(kCalleeName, + "WebRTC-RFC8888CongestionControlFeedback/Disabled/"); + ASSERT_TRUE(CreatePeerConnectionWrappers()); + ConnectFakeSignalingForSdpOnly(); + caller()->AddAudioVideoTracks(); + caller()->CreateAndSetAndSignalOffer(); + ASSERT_THAT(WaitUntil([&] { return SignalingStateStable(); }, IsTrue()), + IsRtcOk()); + { + // Check that the callee parsed the CCFB + auto parsed_contents = + callee()->pc()->remote_description()->description()->contents(); + EXPECT_FALSE(parsed_contents.empty()); + for (const auto& content : parsed_contents) { + EXPECT_TRUE(content.media_description()->rtcp_fb_ack_ccfb()); + } + } + + { + // Check that the caller did NOT get ccfb in response + auto parsed_contents = + caller()->pc()->remote_description()->description()->contents(); + EXPECT_FALSE(parsed_contents.empty()); + for (const auto& content : parsed_contents) { + EXPECT_FALSE(content.media_description()->rtcp_fb_ack_ccfb()); + } + } + // Check that the answer does contain transport-cc + std::string answer_str = absl::StrCat(*caller()->pc()->remote_description()); + EXPECT_THAT(answer_str, HasSubstr("transport-cc")); +} + 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 @@ -1341,11 +1341,13 @@ RTCError MediaSessionDescriptionFactory::AddRtpContentForAnswer( // RFC 8888 support. Only answer with "ack ccfb" if offer has it and // experiment is enabled. if (offer_content_description->rtcp_fb_ack_ccfb()) { - answer_content->set_rtcp_fb_ack_ccfb( - transport_desc_factory_->trials().IsEnabled( - "WebRTC-RFC8888CongestionControlFeedback")); - for (auto& codec : codecs_to_include) { - codec.feedback_params.Remove(FeedbackParam(kRtcpFbParamTransportCc)); + bool use_ccfb = transport_desc_factory_->trials().IsEnabled( + "WebRTC-RFC8888CongestionControlFeedback"); + if (use_ccfb) { + answer_content->set_rtcp_fb_ack_ccfb(use_ccfb); + for (auto& codec : codecs_to_include) { + codec.feedback_params.Remove(FeedbackParam(kRtcpFbParamTransportCc)); + } } } if (!SetCodecsInAnswer(offer_content_description, codecs_to_include,