tor-browser

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

commit 428a3ca18087bf688def885584d78f87b7801178
parent 70a9186bc5684e9bfda47810683098f1b2b4714f
Author: Dan Baker <dbaker@mozilla.com>
Date:   Thu, 23 Oct 2025 16:55:50 -0600

Bug 1995393 - Vendor libwebrtc from cb02a951ee

Upstream commit: https://webrtc.googlesource.com/src/+/cb02a951eea6fb2999536812832084b954fb0864
    Provide default implementation for RemoveIceCandidates

    The deprecated `RemoveIceCandidates` method was a pure virtual function.
    This required all derived classes, including fakes and mocks used in
    tests, to provide a boilerplate implementation.

    To simplify the codebase, this change provides a default implementation
    in the `PeerConnectionInterface`, allowing for the removal of the
    now-redundant overrides from various mock and fake test classes,
    reducing code clutter.

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

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/api/peer_connection_interface.cc | 11+++++++++++
Mthird_party/libwebrtc/api/peer_connection_interface.h | 3+--
Mthird_party/libwebrtc/api/test/mock_peerconnectioninterface.h | 5-----
Mthird_party/libwebrtc/pc/test/fake_peer_connection_base.h | 4----
Mthird_party/libwebrtc/pc/test/mock_peer_connection_internal.h | 4----
6 files changed, 14 insertions(+), 17 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-23T22:53:16.109179+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T22:55:38.131390+00:00. # base of lastest vendoring -c74662219c +cb02a951ee diff --git a/third_party/libwebrtc/api/peer_connection_interface.cc b/third_party/libwebrtc/api/peer_connection_interface.cc @@ -10,7 +10,11 @@ #include "api/peer_connection_interface.h" +#include <vector> + +#include "api/candidate.h" #include "pc/media_factory.h" +#include "rtc_base/checks.h" namespace webrtc { @@ -59,4 +63,11 @@ PeerConnectionFactoryDependencies::PeerConnectionFactoryDependencies( PeerConnectionFactoryDependencies::~PeerConnectionFactoryDependencies() = default; +// deprecated, only implemented to make derived classes simpler. +bool PeerConnectionInterface::RemoveIceCandidates( + const std::vector<Candidate>& candidates) { + RTC_CHECK_NOTREACHED(); + return false; +} + } // namespace webrtc diff --git a/third_party/libwebrtc/api/peer_connection_interface.h b/third_party/libwebrtc/api/peer_connection_interface.h @@ -1138,8 +1138,7 @@ class RTC_EXPORT PeerConnectionInterface : public RefCountInterface { // TODO(bugs.webrtc.org/8395): Use IceCandidate instead of // Candidate, which would avoid the transport_name oddity. [[deprecated("Use IceCandidate version")]] - virtual bool RemoveIceCandidates( - const std::vector<Candidate>& candidates) = 0; + virtual bool RemoveIceCandidates(const std::vector<Candidate>& candidates); // SetBitrate limits the bandwidth allocated for all RTP streams sent by // this PeerConnection. Other limitations might affect these limits and diff --git a/third_party/libwebrtc/api/test/mock_peerconnectioninterface.h b/third_party/libwebrtc/api/test/mock_peerconnectioninterface.h @@ -19,7 +19,6 @@ #include <vector> #include "api/adaptation/resource.h" -#include "api/candidate.h" #include "api/data_channel_event_observer_interface.h" #include "api/data_channel_interface.h" #include "api/dtls_transport_interface.h" @@ -196,10 +195,6 @@ class MockPeerConnectionInterface : public PeerConnectionInterface { (override)); MOCK_METHOD(bool, AddIceCandidate, (const IceCandidate*), (override)); MOCK_METHOD(bool, - RemoveIceCandidates, - (const std::vector<Candidate>&), - (override)); - MOCK_METHOD(bool, RemoveIceCandidate, (const IceCandidate* candidate), (override)); diff --git a/third_party/libwebrtc/pc/test/fake_peer_connection_base.h b/third_party/libwebrtc/pc/test/fake_peer_connection_base.h @@ -233,10 +233,6 @@ class FakePeerConnectionBase : public PeerConnectionInternal { return false; } - bool RemoveIceCandidates(const std::vector<Candidate>& candidates) override { - return false; - } - RTCError SetBitrate(const BitrateSettings& bitrate) override { return RTCError(RTCErrorType::UNSUPPORTED_OPERATION, "Not implemented"); } diff --git a/third_party/libwebrtc/pc/test/mock_peer_connection_internal.h b/third_party/libwebrtc/pc/test/mock_peer_connection_internal.h @@ -214,10 +214,6 @@ class MockPeerConnectionInternal : public PeerConnectionInternal { RemoveIceCandidate, (const IceCandidate* candidate), (override)); - MOCK_METHOD(bool, - RemoveIceCandidates, - (const std::vector<webrtc::Candidate>&), - (override)); MOCK_METHOD(RTCError, SetBitrate, (const BitrateSettings&), (override)); MOCK_METHOD(void, ReconfigureBandwidthEstimation,