tor-browser

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

commit 928c13ac528c9788299e9d6d43d5986c13eface3
parent f200d2f40f41c6b09ca6d085f8c14c74dd86f428
Author: Dan Baker <dbaker@mozilla.com>
Date:   Mon, 27 Oct 2025 15:16:29 -0600

Bug 1995393 - Vendor libwebrtc from eb0e81786a

Upstream commit: https://webrtc.googlesource.com/src/+/eb0e81786a9bd160df15d3d79b44c5fd2eeb1578
    Reland "Remove CreateModularPeerConnectionFactory from peer_connection_interface.h"

    This reverts commit b8de3144a363fb312f1709e7428b67ce0c98ceca.

    Reason for revert: downstream updated

    Bug: webrtc:42220069
    Original change's description:
    > Revert "Remove CreateModularPeerConnectionFactory from peer_connection_interface.h"
    >
    > This reverts commit a680f2910081769e299614a18695a85e3df3af2d.
    >
    > Reason for revert: missed some downstream usage
    >
    > Bug: webrtc:42220069
    > Original change's description:
    > > Remove CreateModularPeerConnectionFactory from peer_connection_interface.h
    > >
    > > build target with peer_connection_interface.h doesn't have definition
    > > of that symbols, which is confusing.
    > >
    > > Users are updated to depend on create_modular_peer_connection_factory
    > > instead that does include the definition.
    > >
    > > Bug: webrtc:42220069
    > > Change-Id: I881c0ceb71afe2fec70dbe68b2392e42d9ad6cbd
    > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/400520
    > > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    > > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
    > > Cr-Commit-Position: refs/heads/main@{#45418}
    >
    > Bug: webrtc:42220069
    > Change-Id: Ia3cf6169a6140ad849af724343b78ecec5ee1229
    > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/406061
    > Owners-Override: Danil Chapovalov <danilchap@webrtc.org>
    > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
    > Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
    > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    > Cr-Commit-Position: refs/heads/main@{#45419}

    Bug: webrtc:42220069
    Change-Id: Ibd15e4dc36ea69ea42be6e2bb2d7e7edb8153139
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/406724
    Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45484}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/api/BUILD.gn | 22++++++++--------------
Athird_party/libwebrtc/api/create_modular_peer_connection_factory.cc | 46++++++++++++++++++++++++++++++++++++++++++++++
Dthird_party/libwebrtc/api/create_modular_peer_connection_factory_internal.h | 39---------------------------------------
Mthird_party/libwebrtc/api/peer_connection_interface.h | 4----
Mthird_party/libwebrtc/moz-patch-stack/s0027.patch | 33++++++++++++++-------------------
Mthird_party/libwebrtc/moz-patch-stack/s0102.patch | 4++--
Mthird_party/libwebrtc/pc/BUILD.gn | 4+---
Mthird_party/libwebrtc/pc/peer_connection_factory.cc | 26--------------------------
9 files changed, 73 insertions(+), 109 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-27T21:13:42.688619+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T21:16:10.421066+00:00. # base of lastest vendoring -3550e3c7a7 +eb0e81786a diff --git a/third_party/libwebrtc/api/BUILD.gn b/third_party/libwebrtc/api/BUILD.gn @@ -73,14 +73,20 @@ rtc_library("enable_media_with_defaults") { ] } -rtc_source_set("create_modular_peer_connection_factory") { +rtc_library("create_modular_peer_connection_factory") { visibility = [ "*" ] allow_poison = [ "environment_construction" ] - sources = [ "create_modular_peer_connection_factory.h" ] + sources = [ + "create_modular_peer_connection_factory.cc", + "create_modular_peer_connection_factory.h", + ] deps = [ ":libjingle_peerconnection_api", ":scoped_refptr", + ":sequence_checker", "../pc:peer_connection_factory", + "../pc:peer_connection_factory_proxy", + "../rtc_base:threading", "../rtc_base/system:rtc_export", "../stats:rtc_stats", ] @@ -317,17 +323,6 @@ rtc_library("rtp_sender_setparameters_callback") { ] } -# TODO: bugs.webrtc.org/42220069 - Remove when downstream has been updated -# to depend on `create_modular_peer_connection_factory` instead. -rtc_source_set("create_modular_peer_connection_factory_internal") { - visibility = [ ":libjingle_peerconnection_api" ] - sources = [ "create_modular_peer_connection_factory_internal.h" ] - deps = [ - ":scoped_refptr", - "../rtc_base/system:rtc_export", - ] -} - rtc_library("libjingle_peerconnection_api") { if (!build_with_mozilla) { visibility = [ "*" ] @@ -369,7 +364,6 @@ if (!build_with_mozilla) { ":async_dns_resolver", ":audio_options_api", ":candidate", - ":create_modular_peer_connection_factory_internal", ":data_channel_event_observer_interface", ":dtls_transport_interface", ":fec_controller_api", diff --git a/third_party/libwebrtc/api/create_modular_peer_connection_factory.cc b/third_party/libwebrtc/api/create_modular_peer_connection_factory.cc @@ -0,0 +1,46 @@ +/* + * Copyright 2025 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#include "api/create_modular_peer_connection_factory.h" + +#include <utility> + +#include "api/peer_connection_interface.h" +#include "api/scoped_refptr.h" +#include "api/sequence_checker.h" +#include "pc/peer_connection_factory.h" +#include "pc/peer_connection_factory_proxy.h" +#include "rtc_base/thread.h" + +namespace webrtc { + +scoped_refptr<PeerConnectionFactoryInterface> +CreateModularPeerConnectionFactory( + PeerConnectionFactoryDependencies dependencies) { + // The PeerConnectionFactory must be created on the signaling thread. + if (dependencies.signaling_thread && + !dependencies.signaling_thread->IsCurrent()) { + return dependencies.signaling_thread->BlockingCall([&dependencies] { + return CreateModularPeerConnectionFactory(std::move(dependencies)); + }); + } + + auto pc_factory = PeerConnectionFactory::Create(std::move(dependencies)); + if (!pc_factory) { + return nullptr; + } + // Verify that the invocation and the initialization ended up agreeing on the + // thread. + RTC_DCHECK_RUN_ON(pc_factory->signaling_thread()); + return PeerConnectionFactoryProxy::Create( + pc_factory->signaling_thread(), pc_factory->worker_thread(), pc_factory); +} + +} // namespace webrtc diff --git a/third_party/libwebrtc/api/create_modular_peer_connection_factory_internal.h b/third_party/libwebrtc/api/create_modular_peer_connection_factory_internal.h @@ -1,39 +0,0 @@ -/* - * Copyright 2025 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This temporary header is here to steer users of the -// CreateModularPeerConnectionFactory to include -// `create_modular_peer_connection_factory.h` and thus depend on -// `create_modular_peer_connection_factory` build target. Once users are -// migrated this file can be deleted. - -// IWYU pragma: private, include "api/create_modular_peer_connection_factory.h" - -#ifndef API_CREATE_MODULAR_PEER_CONNECTION_FACTORY_INTERNAL_H_ -#define API_CREATE_MODULAR_PEER_CONNECTION_FACTORY_INTERNAL_H_ - -#include "api/scoped_refptr.h" -#include "rtc_base/system/rtc_export.h" - -namespace webrtc { - -// Forward declare to avoid circular dependencies with -// `api/peer_connection_interface.h`. This file exists to be included from that -// header, and same time requires classes defined in that header. -class PeerConnectionFactoryInterface; -struct PeerConnectionFactoryDependencies; - -RTC_EXPORT scoped_refptr<PeerConnectionFactoryInterface> -CreateModularPeerConnectionFactory( - PeerConnectionFactoryDependencies dependencies); - -} // namespace webrtc - -#endif // API_CREATE_MODULAR_PEER_CONNECTION_FACTORY_INTERNAL_H_ diff --git a/third_party/libwebrtc/api/peer_connection_interface.h b/third_party/libwebrtc/api/peer_connection_interface.h @@ -148,10 +148,6 @@ #include "rtc_base/system/rtc_export.h" #include "rtc_base/thread.h" -// TODO: bugs.webrtc.org/42220069 - Remove this include when users of this -// function include "create_modular_peer_connection_factory.h" instead. -#include "api/create_modular_peer_connection_factory_internal.h" // IWYU pragma: keep - namespace webrtc { // IWYU pragma: begin_keep // MediaFactory class definition is not part of the api. diff --git a/third_party/libwebrtc/moz-patch-stack/s0027.patch b/third_party/libwebrtc/moz-patch-stack/s0027.patch @@ -203,7 +203,7 @@ index ef07265bf3..348be89bb9 100644 } diff --git a/api/BUILD.gn b/api/BUILD.gn -index 2bbbbfa250..0c872b913e 100644 +index eefa01c4ad..0a99f22d21 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -44,6 +44,9 @@ rtc_library("enable_media") { @@ -216,7 +216,7 @@ index 2bbbbfa250..0c872b913e 100644 } rtc_library("enable_media_with_defaults") { -@@ -83,7 +86,7 @@ rtc_source_set("create_modular_peer_connection_factory") { +@@ -89,7 +92,7 @@ rtc_library("create_modular_peer_connection_factory") { ] } @@ -225,7 +225,7 @@ index 2bbbbfa250..0c872b913e 100644 rtc_library("create_peerconnection_factory") { visibility = [ "*" ] allow_poison = [ "environment_construction" ] -@@ -239,6 +242,10 @@ rtc_source_set("ice_transport_interface") { +@@ -245,6 +248,10 @@ rtc_source_set("ice_transport_interface") { } rtc_library("dtls_transport_interface") { @@ -236,7 +236,7 @@ index 2bbbbfa250..0c872b913e 100644 visibility = [ "*" ] sources = [ -@@ -255,6 +262,7 @@ rtc_library("dtls_transport_interface") { +@@ -261,6 +268,7 @@ rtc_library("dtls_transport_interface") { "//third_party/abseil-cpp/absl/base:core_headers", ] } @@ -244,7 +244,7 @@ index 2bbbbfa250..0c872b913e 100644 rtc_library("dtmf_sender_interface") { visibility = [ "*" ] -@@ -267,6 +275,10 @@ rtc_library("dtmf_sender_interface") { +@@ -273,6 +281,10 @@ rtc_library("dtmf_sender_interface") { } rtc_library("rtp_sender_interface") { @@ -255,7 +255,7 @@ index 2bbbbfa250..0c872b913e 100644 visibility = [ "*" ] sources = [ -@@ -281,6 +293,7 @@ rtc_library("rtp_sender_interface") { +@@ -287,6 +299,7 @@ rtc_library("rtp_sender_interface") { ":ref_count", ":rtc_error", ":rtp_parameters", @@ -263,7 +263,7 @@ index 2bbbbfa250..0c872b913e 100644 ":scoped_refptr", "../rtc_base:checks", "../rtc_base/system:rtc_export", -@@ -289,6 +302,20 @@ rtc_library("rtp_sender_interface") { +@@ -295,8 +308,23 @@ rtc_library("rtp_sender_interface") { "//third_party/abseil-cpp/absl/functional:any_invocable", ] } @@ -282,17 +282,12 @@ index 2bbbbfa250..0c872b913e 100644 + ] +} - # TODO: bugs.webrtc.org/42220069 - Remove when downstream has been updated - # to depend on `create_modular_peer_connection_factory` instead. -@@ -302,6 +329,7 @@ rtc_source_set("create_modular_peer_connection_factory_internal") { - } - rtc_library("libjingle_peerconnection_api") { +if (!build_with_mozilla) { visibility = [ "*" ] cflags = [] sources = [ -@@ -429,6 +457,7 @@ rtc_library("libjingle_peerconnection_api") { +@@ -423,6 +451,7 @@ rtc_library("libjingle_peerconnection_api") { "../rtc_base/system:rtc_export", ] } @@ -300,7 +295,7 @@ index 2bbbbfa250..0c872b913e 100644 rtc_library("frame_transformer_interface") { visibility = [ "*" ] -@@ -648,6 +677,7 @@ rtc_source_set("peer_network_dependencies") { +@@ -642,6 +671,7 @@ rtc_source_set("peer_network_dependencies") { } rtc_source_set("peer_connection_quality_test_fixture_api") { @@ -308,7 +303,7 @@ index 2bbbbfa250..0c872b913e 100644 visibility = [ "*" ] testonly = true sources = [ "test/peerconnection_quality_test_fixture.h" ] -@@ -692,6 +722,7 @@ rtc_source_set("peer_connection_quality_test_fixture_api") { +@@ -686,6 +716,7 @@ rtc_source_set("peer_connection_quality_test_fixture_api") { "//third_party/abseil-cpp/absl/strings:string_view", ] } @@ -316,7 +311,7 @@ index 2bbbbfa250..0c872b913e 100644 rtc_library("frame_generator_api") { visibility = [ "*" ] -@@ -797,6 +828,7 @@ rtc_library("create_frame_generator") { +@@ -791,6 +822,7 @@ rtc_library("create_frame_generator") { ] } @@ -324,7 +319,7 @@ index 2bbbbfa250..0c872b913e 100644 rtc_library("create_peer_connection_quality_test_frame_generator") { visibility = [ "*" ] testonly = true -@@ -814,6 +846,7 @@ rtc_library("create_peer_connection_quality_test_frame_generator") { +@@ -808,6 +840,7 @@ rtc_library("create_peer_connection_quality_test_frame_generator") { "units:time_delta", ] } @@ -332,7 +327,7 @@ index 2bbbbfa250..0c872b913e 100644 rtc_source_set("data_channel_event_observer_interface") { visibility = [ "*" ] -@@ -1006,6 +1039,7 @@ rtc_source_set("refcountedbase") { +@@ -1000,6 +1033,7 @@ rtc_source_set("refcountedbase") { } rtc_library("ice_transport_factory") { @@ -340,7 +335,7 @@ index 2bbbbfa250..0c872b913e 100644 visibility = [ "*" ] sources = [ "ice_transport_factory.cc", -@@ -1029,6 +1063,7 @@ rtc_library("ice_transport_factory") { +@@ -1023,6 +1057,7 @@ rtc_library("ice_transport_factory") { "rtc_event_log", ] } diff --git a/third_party/libwebrtc/moz-patch-stack/s0102.patch b/third_party/libwebrtc/moz-patch-stack/s0102.patch @@ -126,7 +126,7 @@ index b602b8d2ce..4603ed3cfd 100644 "Generated during 'gn gen' by //BUILD.gn.", "", diff --git a/api/BUILD.gn b/api/BUILD.gn -index 0c872b913e..81e97605ce 100644 +index 0a99f22d21..7ab24eafb1 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -8,8 +8,8 @@ @@ -601,7 +601,7 @@ index b7561e53b6..fe7eb57423 100644 import("../../webrtc.gni") diff --git a/pc/BUILD.gn b/pc/BUILD.gn -index 7ed0ded7e6..d9750bebeb 100644 +index 696829d6ca..81bd2a6215 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -30,8 +30,8 @@ diff --git a/third_party/libwebrtc/pc/BUILD.gn b/third_party/libwebrtc/pc/BUILD.gn @@ -476,7 +476,7 @@ rtc_source_set("media_stream_track_proxy") { } rtc_source_set("peer_connection_factory_proxy") { - visibility = [ ":*" ] + visibility = [ "../api:create_modular_peer_connection_factory" ] sources = [ "peer_connection_factory_proxy.h" ] deps = [ ":proxy", @@ -1551,7 +1551,6 @@ rtc_library("peer_connection_factory") { ":media_stream_proxy", ":media_stream_track_proxy", ":peer_connection", - ":peer_connection_factory_proxy", ":peer_connection_proxy", ":rtp_parameters_conversion", ":video_track", @@ -2442,7 +2441,6 @@ if (rtc_include_tests && !build_with_chromium) { ":pc_test_utils", ":peer_connection", ":peer_connection_factory", - ":peer_connection_factory_proxy", ":peer_connection_internal", ":peer_connection_proxy", ":peerconnection_wrapper", diff --git a/third_party/libwebrtc/pc/peer_connection_factory.cc b/third_party/libwebrtc/pc/peer_connection_factory.cc @@ -54,7 +54,6 @@ #include "pc/media_stream_proxy.h" #include "pc/media_stream_track_proxy.h" #include "pc/peer_connection.h" -#include "pc/peer_connection_factory_proxy.h" #include "pc/peer_connection_proxy.h" #include "pc/rtp_parameters_conversion.h" #include "pc/video_track.h" @@ -86,31 +85,6 @@ Environment AssembleEnvironment(PeerConnectionFactoryDependencies& deps) { } // namespace -// TODO: bugs.webrtc.org/42220069 - Move this function to -// 'create_modular_peer_connection_factory' build target when all users of this -// function would depend on that build target. -scoped_refptr<PeerConnectionFactoryInterface> -CreateModularPeerConnectionFactory( - PeerConnectionFactoryDependencies dependencies) { - // The PeerConnectionFactory must be created on the signaling thread. - if (dependencies.signaling_thread && - !dependencies.signaling_thread->IsCurrent()) { - return dependencies.signaling_thread->BlockingCall([&dependencies] { - return CreateModularPeerConnectionFactory(std::move(dependencies)); - }); - } - - auto pc_factory = PeerConnectionFactory::Create(std::move(dependencies)); - if (!pc_factory) { - return nullptr; - } - // Verify that the invocation and the initialization ended up agreeing on the - // thread. - RTC_DCHECK_RUN_ON(pc_factory->signaling_thread()); - return PeerConnectionFactoryProxy::Create( - pc_factory->signaling_thread(), pc_factory->worker_thread(), pc_factory); -} - // Static scoped_refptr<PeerConnectionFactory> PeerConnectionFactory::Create( PeerConnectionFactoryDependencies dependencies) {