tor-browser

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

commit d6c5c8ce4043ea71e4317c1c5039b6894a4ccc25
parent 7b362e39eb69d5afa9655f11b82a459d91bc2b9a
Author: Michael Froman <mfroman@mozilla.com>
Date:   Thu,  9 Oct 2025 09:29:16 -0500

Bug 1993083 - Vendor libwebrtc from 97a3382bf6

Upstream commit: https://webrtc.googlesource.com/src/+/97a3382bf662bf5289669829d3d6c8ef55b4731d
    IWYU rtc_base (misc)

    using the usual
      find rtc_base -name "*.h" -o -name "*.cc" | xargs tools_webrtc/iwyu/apply-include-cleaner
    followed by
      tools_webrtc/gn_check_autofix.py -C out/Default
    followed by
      git cl format

    and manual resolution or reverts of files that require a more
    focused review.

    Split from
      https://webrtc-review.googlesource.com/c/src/+/398903

    Bug: webrtc:42226242
    Change-Id: I9893da7f4da437d3a38277aaca7fafc8bf0b9bf3
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/399060
    Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Philipp Hancke <phancke@meta.com>
    Cr-Commit-Position: refs/heads/main@{#45122}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0001.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0027.patch | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0043.patch | 10+++++-----
Mthird_party/libwebrtc/moz-patch-stack/s0053.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0091.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0094.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0103.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0108.patch | 2+-
Mthird_party/libwebrtc/rtc_base/BUILD.gn | 1+
Mthird_party/libwebrtc/rtc_base/checks.cc | 3+++
Mthird_party/libwebrtc/rtc_base/crc32.h | 6++----
Mthird_party/libwebrtc/rtc_base/fake_clock.cc | 6++++++
Mthird_party/libwebrtc/rtc_base/fake_mdns_responder.h | 2+-
Mthird_party/libwebrtc/rtc_base/gunit.h | 8+++-----
Mthird_party/libwebrtc/rtc_base/ref_counted_object_unittest.cc | 2+-
Mthird_party/libwebrtc/rtc_base/system/file_wrapper.cc | 7+++----
Mthird_party/libwebrtc/rtc_base/system/file_wrapper.h | 8+++-----
Mthird_party/libwebrtc/rtc_base/system/file_wrapper_unittest.cc | 8+++++++-
Mthird_party/libwebrtc/rtc_base/system_time.cc | 21+++++++++++----------
Mthird_party/libwebrtc/rtc_base/task_queue_unittest.cc | 23+++++++++--------------
Mthird_party/libwebrtc/rtc_base/time_utils.cc | 4++--
Mthird_party/libwebrtc/rtc_base/time_utils.h | 2--
Mthird_party/libwebrtc/rtc_base/time_utils_unittest.cc | 3+++
Mthird_party/libwebrtc/rtc_base/win32_unittest.cc | 2++
Mthird_party/libwebrtc/sdk/objc/api/peerconnection/RTCDtmfSender.mm | 1+
26 files changed, 73 insertions(+), 64 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-09T04:30:54.960324+00:00. +libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T14:29:06.700462+00:00. # base of lastest vendoring -959659e8f6 +97a3382bf6 diff --git a/third_party/libwebrtc/moz-patch-stack/s0001.patch b/third_party/libwebrtc/moz-patch-stack/s0001.patch @@ -1383,7 +1383,7 @@ index d5ce6105a3..8bfd24de2b 100644 const bool enable_svc_for_simulcast_; std::optional<SimulcastToSvcConverter> simulcast_to_svc_converter_; diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn -index 2ac18ac905..53dcd12334 100644 +index cffc631ba1..212939da78 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -450,6 +450,12 @@ rtc_library("logging") { diff --git a/third_party/libwebrtc/moz-patch-stack/s0027.patch b/third_party/libwebrtc/moz-patch-stack/s0027.patch @@ -1013,7 +1013,7 @@ index 058b86bce4..2f7b5b5333 100644 "/config/external/nspr", "/nsprpub/lib/ds", diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn -index 53dcd12334..0940f4ef33 100644 +index 212939da78..db39bc5d26 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -326,6 +326,7 @@ rtc_library("sample_counter") { @@ -1176,7 +1176,7 @@ index 53dcd12334..0940f4ef33 100644 rtc_library("ssl_adapter") { visibility = [ "*" ] -@@ -2358,7 +2382,7 @@ if (rtc_include_tests) { +@@ -2359,7 +2383,7 @@ if (rtc_include_tests) { } } diff --git a/third_party/libwebrtc/moz-patch-stack/s0043.patch b/third_party/libwebrtc/moz-patch-stack/s0043.patch @@ -9,15 +9,15 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/3e8ac168ee3db089d 1 file changed, 2 insertions(+) diff --git a/rtc_base/system_time.cc b/rtc_base/system_time.cc -index 83a08f64f4..36d95447e0 100644 +index d5076431d3..e6ce4b2a74 100644 --- a/rtc_base/system_time.cc +++ b/rtc_base/system_time.cc -@@ -12,6 +12,8 @@ - // webrtc::SystemTimeNanos() must be provided externally. +@@ -13,6 +13,8 @@ #ifndef WEBRTC_EXCLUDE_SYSTEM_TIME + #include "rtc_base/system_time.h" +#error Mozilla: Must not use the built-in libwebrtc clock + - #include <stdint.h> + #include <time.h> - #include <limits> + #include <cstdint> diff --git a/third_party/libwebrtc/moz-patch-stack/s0053.patch b/third_party/libwebrtc/moz-patch-stack/s0053.patch @@ -29,7 +29,7 @@ index 7db75d5fd3..d0feb5007c 100644 rtc_library("task_queue_test") { visibility = [ "*" ] diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn -index 0940f4ef33..28d117cb3d 100644 +index db39bc5d26..18cb8eb684 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -665,10 +665,14 @@ if (is_mac || is_ios) { diff --git a/third_party/libwebrtc/moz-patch-stack/s0091.patch b/third_party/libwebrtc/moz-patch-stack/s0091.patch @@ -13,7 +13,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/4e7b3c485e549e7e3 1 file changed, 6 insertions(+) diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn -index 28d117cb3d..ff0e38f5cd 100644 +index 18cb8eb684..138a41e57d 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -992,6 +992,12 @@ rtc_library("threading") { diff --git a/third_party/libwebrtc/moz-patch-stack/s0094.patch b/third_party/libwebrtc/moz-patch-stack/s0094.patch @@ -9,7 +9,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/ee2f06666bcc6d22c 1 file changed, 2 insertions(+) diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn -index ff0e38f5cd..84163ffff2 100644 +index 138a41e57d..ad3ee8da5f 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -1643,6 +1643,7 @@ if (!build_with_mozilla) { diff --git a/third_party/libwebrtc/moz-patch-stack/s0103.patch b/third_party/libwebrtc/moz-patch-stack/s0103.patch @@ -616,7 +616,7 @@ index 605b9bb84a..278e312c85 100644 if (rtc_build_libsrtp) { diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn -index 84163ffff2..ad172a2b70 100644 +index ad3ee8da5f..8a7ca1e90b 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -9,8 +9,8 @@ diff --git a/third_party/libwebrtc/moz-patch-stack/s0108.patch b/third_party/libwebrtc/moz-patch-stack/s0108.patch @@ -116,7 +116,7 @@ index 6f2dc22e00..e3ee0fe861 100644 public_configs = [] if (!build_with_chromium) { diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn -index ad172a2b70..00719143e6 100644 +index 8a7ca1e90b..0dc4f17686 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -1522,6 +1522,7 @@ rtc_source_set("ssl_header") { diff --git a/third_party/libwebrtc/rtc_base/BUILD.gn b/third_party/libwebrtc/rtc_base/BUILD.gn @@ -2206,6 +2206,7 @@ if (rtc_include_tests) { ":rtc_event", ":task_queue_for_test", ":timeutils", + "../api/task_queue", "../api/units:time_delta", "../test:test_main", "../test:test_support", diff --git a/third_party/libwebrtc/rtc_base/checks.cc b/third_party/libwebrtc/rtc_base/checks.cc @@ -11,9 +11,12 @@ // Most of this was borrowed (with minor modifications) from V8's and Chromium's // src/base/logging.cc. +#include <stdlib.h> + #include <cstdarg> #include <cstdio> #include <cstdlib> +#include <string> #include "absl/strings/string_view.h" diff --git a/third_party/libwebrtc/rtc_base/crc32.h b/third_party/libwebrtc/rtc_base/crc32.h @@ -11,10 +11,8 @@ #ifndef RTC_BASE_CRC32_H_ #define RTC_BASE_CRC32_H_ -#include <stddef.h> -#include <stdint.h> - -#include <string> +#include <cstddef> +#include <cstdint> #include "absl/strings/string_view.h" diff --git a/third_party/libwebrtc/rtc_base/fake_clock.cc b/third_party/libwebrtc/rtc_base/fake_clock.cc @@ -10,8 +10,14 @@ #include "rtc_base/fake_clock.h" +#include <cstdint> + +#include "api/units/time_delta.h" +#include "api/units/timestamp.h" #include "rtc_base/checks.h" +#include "rtc_base/synchronization/mutex.h" #include "rtc_base/thread.h" +#include "rtc_base/time_utils.h" namespace webrtc { diff --git a/third_party/libwebrtc/rtc_base/fake_mdns_responder.h b/third_party/libwebrtc/rtc_base/fake_mdns_responder.h @@ -11,8 +11,8 @@ #ifndef RTC_BASE_FAKE_MDNS_RESPONDER_H_ #define RTC_BASE_FAKE_MDNS_RESPONDER_H_ +#include <cstdint> #include <map> -#include <memory> #include <string> #include "absl/strings/string_view.h" diff --git a/third_party/libwebrtc/rtc_base/gunit.h b/third_party/libwebrtc/rtc_base/gunit.h @@ -11,11 +11,9 @@ #ifndef RTC_BASE_GUNIT_H_ #define RTC_BASE_GUNIT_H_ -#include "absl/strings/string_view.h" -#include "rtc_base/fake_clock.h" -#include "rtc_base/logging.h" -#include "rtc_base/thread.h" -#include "test/gtest.h" +// TODO(bugs.webrtc.org/42226242): remove transitive includes +#include "rtc_base/thread.h" // IWYU pragma: keep +#include "test/gtest.h" // IWYU pragma: keep // Wait until "ex" is true, or "timeout" expires. #define WAIT(ex, timeout) \ diff --git a/third_party/libwebrtc/rtc_base/ref_counted_object_unittest.cc b/third_party/libwebrtc/rtc_base/ref_counted_object_unittest.cc @@ -17,8 +17,8 @@ #include "absl/strings/string_view.h" #include "api/make_ref_counted.h" +#include "api/ref_count.h" #include "api/scoped_refptr.h" -#include "rtc_base/ref_count.h" #include "test/gtest.h" namespace webrtc { diff --git a/third_party/libwebrtc/rtc_base/system/file_wrapper.cc b/third_party/libwebrtc/rtc_base/system/file_wrapper.cc @@ -10,12 +10,13 @@ #include "rtc_base/system/file_wrapper.h" -#include <stddef.h> - #include <cerrno> +#include <cstddef> #include <cstdint> +#include <cstdio> #include <optional> #include <string> +#include <utility> #include "absl/strings/string_view.h" #include "rtc_base/checks.h" @@ -26,8 +27,6 @@ #else #endif -#include <utility> - namespace webrtc { namespace { FILE* FileOpen(absl::string_view file_name_utf8, bool read_only, int* error) { diff --git a/third_party/libwebrtc/rtc_base/system/file_wrapper.h b/third_party/libwebrtc/rtc_base/system/file_wrapper.h @@ -11,12 +11,10 @@ #ifndef RTC_BASE_SYSTEM_FILE_WRAPPER_H_ #define RTC_BASE_SYSTEM_FILE_WRAPPER_H_ -#include <stddef.h> -#include <stdint.h> -#include <stdio.h> - +#include <cstddef> +#include <cstdint> +#include <cstdio> #include <optional> -#include <string> #include "absl/strings/string_view.h" diff --git a/third_party/libwebrtc/rtc_base/system/file_wrapper_unittest.cc b/third_party/libwebrtc/rtc_base/system/file_wrapper_unittest.cc @@ -10,7 +10,13 @@ #include "rtc_base/system/file_wrapper.h" -#include "rtc_base/checks.h" +#include <stdio.h> + +#include <algorithm> +#include <cstddef> +#include <cstring> +#include <string> + #include "test/gtest.h" #include "test/testsupport/file_utils.h" diff --git a/third_party/libwebrtc/rtc_base/system_time.cc b/third_party/libwebrtc/rtc_base/system_time.cc @@ -11,18 +11,24 @@ // If WEBRTC_EXCLUDE_SYSTEM_TIME is set, an implementation of // webrtc::SystemTimeNanos() must be provided externally. #ifndef WEBRTC_EXCLUDE_SYSTEM_TIME +#include "rtc_base/system_time.h" #error Mozilla: Must not use the built-in libwebrtc clock -#include <stdint.h> +#include <time.h> -#include <limits> +#include <cstdint> +#include <ctime> + +#include "rtc_base/time_utils.h" -#if defined(WEBRTC_POSIX) -#include <sys/time.h> #if defined(WEBRTC_MAC) #include <mach/mach_time.h> -#endif + +#include <limits> + +#include "rtc_base/checks.h" +#include "rtc_base/numerics/safe_conversions.h" #endif #if defined(WEBRTC_WIN) @@ -35,11 +41,6 @@ // clang-format on #endif -#include "rtc_base/checks.h" -#include "rtc_base/numerics/safe_conversions.h" -#include "rtc_base/system_time.h" -#include "rtc_base/time_utils.h" - namespace webrtc { int64_t SystemTimeNanos() { diff --git a/third_party/libwebrtc/rtc_base/task_queue_unittest.cc b/third_party/libwebrtc/rtc_base/task_queue_unittest.cc @@ -8,28 +8,23 @@ * be found in the AUTHORS file in the root of the source tree. */ -#if defined(WEBRTC_WIN) -// clang-format off -#include <windows.h> // Must come first. -#include <mmsystem.h> -// clang-format on -#endif - -#include <stdint.h> - -#include <memory> -#include <utility> -#include <vector> +#include <cstdint> -#include "absl/memory/memory.h" +#include "api/task_queue/task_queue_factory.h" #include "api/units/time_delta.h" #include "rtc_base/event.h" #include "rtc_base/task_queue_for_test.h" #include "rtc_base/time_utils.h" #include "test/gtest.h" -namespace webrtc { +#if defined(WEBRTC_WIN) +// clang-format off +#include <windows.h> // Must come first. +#include <mmsystem.h> +// clang-format on +#endif +namespace webrtc { namespace { // Noop on all platforms except Windows, where it turns on high precision diff --git a/third_party/libwebrtc/rtc_base/time_utils.cc b/third_party/libwebrtc/rtc_base/time_utils.cc @@ -8,14 +8,14 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include <stdint.h> +#include <cstdint> +#include <ctime> #if defined(WEBRTC_POSIX) #include <sys/time.h> #endif #include "rtc_base/checks.h" -#include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/system_time.h" #include "rtc_base/time_utils.h" #if defined(WEBRTC_WIN) diff --git a/third_party/libwebrtc/rtc_base/time_utils.h b/third_party/libwebrtc/rtc_base/time_utils.h @@ -14,9 +14,7 @@ #include <stdint.h> #include <time.h> -#include "rtc_base/checks.h" #include "rtc_base/system/rtc_export.h" -#include "rtc_base/system_time.h" namespace webrtc { diff --git a/third_party/libwebrtc/rtc_base/time_utils_unittest.cc b/third_party/libwebrtc/rtc_base/time_utils_unittest.cc @@ -10,9 +10,12 @@ #include "rtc_base/time_utils.h" +#include <cstdint> +#include <ctime> #include <memory> #include "api/units/time_delta.h" +#include "api/units/timestamp.h" #include "rtc_base/crypto_random.h" #include "rtc_base/event.h" #include "rtc_base/fake_clock.h" diff --git a/third_party/libwebrtc/rtc_base/win32_unittest.cc b/third_party/libwebrtc/rtc_base/win32_unittest.cc @@ -13,7 +13,9 @@ #include <string> #include "rtc_base/gunit.h" +#include "rtc_base/ip_address.h" #include "rtc_base/net_helpers.h" +#include "test/gtest.h" #if !defined(WEBRTC_WIN) #error Only for Windows diff --git a/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCDtmfSender.mm b/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCDtmfSender.mm @@ -14,6 +14,7 @@ #import "helpers/NSString+StdString.h" #include "api/scoped_refptr.h" +#include "rtc_base/checks.h" #include "rtc_base/time_utils.h" @implementation RTC_OBJC_TYPE (RTCDtmfSender) {