tor-browser

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

commit 522d4d62c606b07240c393ed383be1f9aca2778e
parent 604a8de79856b2f18eac2f3014fac150d25bc98d
Author: Dan Baker <dbaker@mozilla.com>
Date:   Mon,  1 Dec 2025 19:40:08 -0700

Bug 2000941 - Vendor libwebrtc from 6ffd467db2

Upstream commit: https://webrtc.googlesource.com/src/+/6ffd467db2b7f0818e8ecda6aabbf6fedcf6ae64
    Remove unneeded accessor to field_trials in ice_transport

    User of that accessor has more reliable access to the same field trials
    via Environment provided at construction.

    Bug: webrtc:367395350
    Change-Id: Iff621ed6d9d9adcd68e5ce39c84244a20dbe54d1
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/408941
    Reviewed-by: Per Kjellander <perkj@webrtc.org>
    Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45627}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/moz-patch-stack/p0001.patch | 4++--
Mthird_party/libwebrtc/p2p/BUILD.gn | 1+
Mthird_party/libwebrtc/p2p/base/ice_transport_internal.h | 4+---
Mthird_party/libwebrtc/p2p/base/p2p_transport_channel.h | 4----
Mthird_party/libwebrtc/p2p/dtls/dtls_transport.cc | 12+++---------
6 files changed, 9 insertions(+), 20 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:37:24.059453+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T02:39:49.935383+00:00. # base of lastest vendoring -3c35dd3c93 +6ffd467db2 diff --git a/third_party/libwebrtc/moz-patch-stack/p0001.patch b/third_party/libwebrtc/moz-patch-stack/p0001.patch @@ -65,7 +65,7 @@ index 7843a8b37d..a4b96db00b 100644 void IceTransportInternal::SubscribeRoleConflict( diff --git a/p2p/base/ice_transport_internal.h b/p2p/base/ice_transport_internal.h -index 69b8214fe1..0e233df6a5 100644 +index 9f6722c8ad..c83a7d70d7 100644 --- a/p2p/base/ice_transport_internal.h +++ b/p2p/base/ice_transport_internal.h @@ -352,9 +352,11 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal { @@ -81,7 +81,7 @@ index 69b8214fe1..0e233df6a5 100644 } void SubscribeCandidateGathered( absl::AnyInvocable<void(IceTransportInternal*, const Candidate&)> -@@ -464,8 +466,9 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal { +@@ -462,8 +464,9 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal { candidate_pair_change_callback_; private: diff --git a/third_party/libwebrtc/p2p/BUILD.gn b/third_party/libwebrtc/p2p/BUILD.gn @@ -441,6 +441,7 @@ rtc_library("ice_transport_internal") { "../api:rtc_error", "../api/transport:enums", "../api/transport:stun_types", + "../api/units:time_delta", "../rtc_base:callback_list", "../rtc_base:checks", "../rtc_base:net_helper", diff --git a/third_party/libwebrtc/p2p/base/ice_transport_internal.h b/third_party/libwebrtc/p2p/base/ice_transport_internal.h @@ -22,10 +22,10 @@ #include "absl/strings/string_view.h" #include "api/array_view.h" #include "api/candidate.h" -#include "api/field_trials_view.h" #include "api/peer_connection_interface.h" #include "api/rtc_error.h" #include "api/transport/enums.h" +#include "api/units/time_delta.h" #include "p2p/base/candidate_pair_interface.h" #include "p2p/base/connection.h" #include "p2p/base/connection_info.h" @@ -438,8 +438,6 @@ class RTC_EXPORT IceTransportInternal : public PacketTransportInternal { dictionary_writer_synced_callback_list_.RemoveReceivers(tag); } - virtual const FieldTrialsView* field_trials() const { return nullptr; } - virtual void ResetDtlsStunPiggybackCallbacks() {} virtual void SetDtlsStunPiggybackCallbacks( DtlsStunPiggybackCallbacks&& callbacks) {} diff --git a/third_party/libwebrtc/p2p/base/p2p_transport_channel.h b/third_party/libwebrtc/p2p/base/p2p_transport_channel.h @@ -243,10 +243,6 @@ class RTC_EXPORT P2PTransportChannel : public IceTransportInternal, return stun_dict_writer_; } - const FieldTrialsView* field_trials() const override { - return &env_.field_trials(); - } - void ResetDtlsStunPiggybackCallbacks() override; void SetDtlsStunPiggybackCallbacks( DtlsStunPiggybackCallbacks&& callbacks) override; diff --git a/third_party/libwebrtc/p2p/dtls/dtls_transport.cc b/third_party/libwebrtc/p2p/dtls/dtls_transport.cc @@ -194,7 +194,7 @@ DtlsTransportInternalImpl::DtlsTransportInternalImpl( IceTransportInternal* ice_transport, const CryptoOptions& crypto_options, SSLProtocolVersion max_version) - : env_(std::move(env)), + : env_(env), component_(ice_transport->component()), ice_transport_(ice_transport), downward_(nullptr), @@ -213,13 +213,7 @@ DtlsTransportInternalImpl::DtlsTransportInternalImpl( }) { RTC_DCHECK(ice_transport_); ConnectToIceTransport(); - if (auto field_trials = ice_transport_->field_trials()) { - dtls_in_stun_ = field_trials->IsEnabled("WebRTC-IceHandshakeDtls"); - } else { - // TODO (BUG=webrtc:367395350): Fix upstream testcase(s). - RTC_DLOG(LS_ERROR) << "ice_transport_>field_trials() is NULL"; - dtls_in_stun_ = false; - } + dtls_in_stun_ = env_.field_trials().IsEnabled("WebRTC-IceHandshakeDtls"); } DtlsTransportInternalImpl::~DtlsTransportInternalImpl() { @@ -447,7 +441,7 @@ bool DtlsTransportInternalImpl::SetupDtls() { dtls_ = SSLStreamAdapter::Create( std::move(downward), [this](SSLHandshakeError error) { OnDtlsHandshakeError(error); }, - ice_transport_->field_trials()); + &env_.field_trials()); if (!dtls_) { RTC_LOG(LS_ERROR) << ToString() << ": Failed to create DTLS adapter."; return false;