tor-browser

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

commit 2b433026498e1e35c0d8f632c1e5d35763c2622a
parent 5489144ae48b51b4f226aa62d7d249d4b941f803
Author: Michael Froman <mfroman@mozilla.com>
Date:   Thu,  9 Oct 2025 15:21:29 -0500

Bug 1993083 - Vendor libwebrtc from 8645c55f24

Upstream commit: https://webrtc.googlesource.com/src/+/8645c55f24e7a856eefefc28cf6cbf5875243775
    Delete SignalStateChanged from IceTransportInternal

    The standardized state is signalled via SignalIceTransportStateChanged;
    listening to that should give the same result as long as it fires every
    time the old signal fired.

    Bug: webrtc:9308
    Change-Id: Ie56ec9e163f8f9648d43f95300ca1ad68c59bd2b
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329021
    Reviewed-by: Philip Eliasson <philipel@webrtc.org>
    Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45183}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/api/peer_connection_interface.h | 4++++
Mthird_party/libwebrtc/p2p/base/ice_transport_internal.h | 5-----
Mthird_party/libwebrtc/p2p/base/p2p_transport_channel.cc | 7++++---
Mthird_party/libwebrtc/p2p/base/p2p_transport_channel_unittest.cc | 2+-
Mthird_party/libwebrtc/p2p/base/regathering_controller.cc | 2+-
Mthird_party/libwebrtc/p2p/test/fake_ice_transport.h | 2+-
Mthird_party/libwebrtc/pc/jsep_transport_controller.cc | 2--
Mthird_party/libwebrtc/pc/peer_connection_integrationtest.cc | 6+++++-
9 files changed, 18 insertions(+), 16 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 /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T20:20:11.890326+00:00. +libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T20:21:20.286189+00:00. # base of lastest vendoring -b2ea936d33 +8645c55f24 diff --git a/third_party/libwebrtc/api/peer_connection_interface.h b/third_party/libwebrtc/api/peer_connection_interface.h @@ -232,6 +232,10 @@ class RTC_EXPORT PeerConnectionInterface : public RefCountInterface { kIceConnectionMax, }; static constexpr absl::string_view AsString(IceConnectionState state); + template <typename Sink> + void AbslStringify(Sink& sink, IceConnectionState state) { + sink.Append(AsString(state)); + } // TLS certificate policy. enum TlsCertPolicy { diff --git a/third_party/libwebrtc/p2p/base/ice_transport_internal.h b/third_party/libwebrtc/p2p/base/ice_transport_internal.h @@ -381,11 +381,6 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal { // agents. sigslot::signal1<IceTransportInternal*> SignalRoleConflict; - // Emitted whenever the transport state changed. - // TODO(bugs.webrtc.org/9308): Remove once all uses have migrated to the new - // IceTransportState. - sigslot::signal1<IceTransportInternal*> SignalStateChanged; - // Emitted whenever the new standards-compliant transport state changed. sigslot::signal1<IceTransportInternal*> SignalIceTransportStateChanged; diff --git a/third_party/libwebrtc/p2p/base/p2p_transport_channel.cc b/third_party/libwebrtc/p2p/base/p2p_transport_channel.cc @@ -1979,12 +1979,13 @@ void P2PTransportChannel::UpdateTransportState() { RTC_DCHECK_NOTREACHED(); break; } - state_ = state; - SignalStateChanged(this); } - if (standardized_state_ != current_standardized_state) { + if (standardized_state_ != current_standardized_state || state_ != state) { standardized_state_ = current_standardized_state; + state_ = state; + // Unconditionally signal change, no matter what changed. + // TODO: issues.webrtc.org/42234495 - rmeove nonstandard state_ SignalIceTransportStateChanged(this); } } diff --git a/third_party/libwebrtc/p2p/base/p2p_transport_channel_unittest.cc b/third_party/libwebrtc/p2p/base/p2p_transport_channel_unittest.cc @@ -3856,7 +3856,7 @@ class P2PTransportChannelPingTest : public ::testing::Test, this, &P2PTransportChannelPingTest::OnNetworkRouteChanged); ch->SignalReadyToSend.connect(this, &P2PTransportChannelPingTest::OnReadyToSend); - ch->SignalStateChanged.connect( + ch->SignalIceTransportStateChanged.connect( this, &P2PTransportChannelPingTest::OnChannelStateChanged); ch->SetCandidatePairChangeCallback( [this](const CandidatePairChangeEvent& event) { diff --git a/third_party/libwebrtc/p2p/base/regathering_controller.cc b/third_party/libwebrtc/p2p/base/regathering_controller.cc @@ -27,7 +27,7 @@ BasicRegatheringController::BasicRegatheringController( RTC_DCHECK(thread_); RTC_DCHECK_RUN_ON(thread_); RTC_DCHECK(ice_transport_); - ice_transport_->SignalStateChanged.connect( + ice_transport_->SignalIceTransportStateChanged.connect( this, &BasicRegatheringController::OnIceTransportStateChanged); ice_transport->SignalWritableState.connect( this, &BasicRegatheringController::OnIceTransportWritableState); diff --git a/third_party/libwebrtc/p2p/test/fake_ice_transport.h b/third_party/libwebrtc/p2p/test/fake_ice_transport.h @@ -164,7 +164,7 @@ class FakeIceTransport : public IceTransportInternal { // In this fake transport channel, `connection_count_` determines the // transport state. if (connection_count_ < old_connection_count) { - SignalStateChanged(this); + SignalIceTransportStateChanged(this); } } diff --git a/third_party/libwebrtc/pc/jsep_transport_controller.cc b/third_party/libwebrtc/pc/jsep_transport_controller.cc @@ -589,8 +589,6 @@ JsepTransportController::CreateDtlsTransport(const ContentInfo& content_info, }); dtls->ice_transport()->SignalRoleConflict.connect( this, &JsepTransportController::OnTransportRoleConflict_n); - dtls->ice_transport()->SignalStateChanged.connect( - this, &JsepTransportController::OnTransportStateChanged_n); dtls->ice_transport()->SignalIceTransportStateChanged.connect( this, &JsepTransportController::OnTransportStateChanged_n); dtls->ice_transport()->SetCandidatePairChangeCallback( diff --git a/third_party/libwebrtc/pc/peer_connection_integrationtest.cc b/third_party/libwebrtc/pc/peer_connection_integrationtest.cc @@ -2256,7 +2256,11 @@ TEST_P(PeerConnectionIntegrationTest, MediaContinuesFlowingAfterIceRestart) { ASSERT_NE(callee_candidate_pre_restart, callee_candidate_post_restart); ASSERT_NE(caller_ufrag_pre_restart, caller_ufrag_post_restart); ASSERT_NE(callee_ufrag_pre_restart, callee_ufrag_post_restart); - EXPECT_GT(caller()->ice_candidate_pair_change_history().size(), 1u); + EXPECT_THAT( + WaitUntil( + [&] { return caller()->ice_candidate_pair_change_history().size(); }, + Gt(1U), {.timeout = kMaxWaitForFrames}), + IsRtcOk()); // Ensure that additional frames are received after the ICE restart. MediaExpectations media_expectations;