tor-browser

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

commit 712fb5d8dbba7ed974eb65500446cb8f7117517e
parent 7337115dc0f35ea8f0a412765551e2f8cf3c0431
Author: Dan Baker <dbaker@mozilla.com>
Date:   Mon, 27 Oct 2025 17:07:00 -0600

Bug 1995393 - Vendor libwebrtc from 745d8f1750

Upstream commit: https://webrtc.googlesource.com/src/+/745d8f1750b635b4e11596a09bb09c5fb1bad19e
    Add sigslot trampolines for IceTransportInternal

    This adds API to subscribe to the four remaining sigslots
    in IceTransportInternal.

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

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/moz-patch-stack/p0001.patch | 2+-
Mthird_party/libwebrtc/p2p/BUILD.gn | 1+
Mthird_party/libwebrtc/p2p/base/ice_transport_internal.cc | 6+++++-
Mthird_party/libwebrtc/p2p/base/ice_transport_internal.h | 44++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 53 insertions(+), 4 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-27T23:04:01.478854+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T23:06:48.552304+00:00. # base of lastest vendoring -fefd3997fa +745d8f1750 diff --git a/third_party/libwebrtc/moz-patch-stack/p0001.patch b/third_party/libwebrtc/moz-patch-stack/p0001.patch @@ -38,7 +38,7 @@ Cr-Commit-Position: refs/heads/main@{#45518} 6 files changed, 61 insertions(+), 67 deletions(-) diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn -index 281a0d0d2d..985afdc690 100644 +index 825e3995b1..34f6ef11ea 100644 --- a/p2p/BUILD.gn +++ b/p2p/BUILD.gn @@ -81,10 +81,7 @@ rtc_library("basic_ice_controller") { diff --git a/third_party/libwebrtc/p2p/BUILD.gn b/third_party/libwebrtc/p2p/BUILD.gn @@ -435,6 +435,7 @@ rtc_library("ice_transport_internal") { "../rtc_base:checks", "../rtc_base:net_helper", "../rtc_base:network_constants", + "../rtc_base:sigslot_trampoline", "../rtc_base:timeutils", "../rtc_base/network:received_packet", "../rtc_base/system:rtc_export", diff --git a/third_party/libwebrtc/p2p/base/ice_transport_internal.cc b/third_party/libwebrtc/p2p/base/ice_transport_internal.cc @@ -226,7 +226,11 @@ RTCError IceConfig::IsValid() const { return RTCError::OK(); } -IceTransportInternal::IceTransportInternal() {} +IceTransportInternal::IceTransportInternal() + : candidate_gathered_trampoline_(this), + role_conflict_trampoline_(this), + ice_transport_state_changed_trampoline_(this), + destroyed_trampoline_(this) {} IceTransportInternal::~IceTransportInternal() = default; diff --git a/third_party/libwebrtc/p2p/base/ice_transport_internal.h b/third_party/libwebrtc/p2p/base/ice_transport_internal.h @@ -37,6 +37,7 @@ #include "rtc_base/callback_list.h" #include "rtc_base/checks.h" #include "rtc_base/network_constants.h" +#include "rtc_base/sigslot_trampoline.h" #include "rtc_base/system/rtc_export.h" #include "rtc_base/third_party/sigslot/sigslot.h" @@ -354,6 +355,15 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal { // Handles sending and receiving of candidates. sigslot::signal2<IceTransportInternal*, const Candidate&> SignalCandidateGathered; + void NotifyCandidateGathered(IceTransportInternal* transport, + const Candidate& candidate) { + SignalCandidateGathered(transport, candidate); + } + void SubscribeCandidateGathered( + absl::AnyInvocable<void(IceTransportInternal*, const Candidate&)> + callback) { + candidate_gathered_trampoline_.Subscribe(std::move(callback)); + } void SetCandidateErrorCallback( absl::AnyInvocable<void(IceTransportInternal*, @@ -386,12 +396,33 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal { // Invoked when there is conflict in the ICE role between local and remote // agents. sigslot::signal1<IceTransportInternal*> SignalRoleConflict; + void NotifyRoleConflict(IceTransportInternal* transport) { + SignalRoleConflict(transport); + } + void SubscribeRoleConflict( + absl::AnyInvocable<void(IceTransportInternal*)> callback) { + role_conflict_trampoline_.Subscribe(std::move(callback)); + } // Emitted whenever the new standards-compliant transport state changed. sigslot::signal1<IceTransportInternal*> SignalIceTransportStateChanged; + void NotifyIceTransportStateChanged(IceTransportInternal* transport) { + SignalIceTransportStateChanged(transport); + } + void SubscribeIceTransportStateChanged( + absl::AnyInvocable<void(IceTransportInternal*)> callback) { + ice_transport_state_changed_trampoline_.Subscribe(std::move(callback)); + } // Invoked when the transport is being destroyed. sigslot::signal1<IceTransportInternal*> SignalDestroyed; + void NotifyDestroyed(IceTransportInternal* transport) { + SignalDestroyed(transport); + } + void SubscribeDestroyed( + absl::AnyInvocable<void(IceTransportInternal*)> callback) { + destroyed_trampoline_.Subscribe(std::move(callback)); + } // Invoked when remote dictionary has been updated, // i.e. modifications to attributes from remote ice agent has @@ -442,6 +473,19 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal { absl::AnyInvocable<void(const CandidatePairChangeEvent&)> candidate_pair_change_callback_; + + private: + SignalTrampoline<IceTransportInternal, + &IceTransportInternal::SignalCandidateGathered> + candidate_gathered_trampoline_; + SignalTrampoline<IceTransportInternal, + &IceTransportInternal::SignalRoleConflict> + role_conflict_trampoline_; + SignalTrampoline<IceTransportInternal, + &IceTransportInternal::SignalIceTransportStateChanged> + ice_transport_state_changed_trampoline_; + SignalTrampoline<IceTransportInternal, &IceTransportInternal::SignalDestroyed> + destroyed_trampoline_; }; } // namespace webrtc