tor-browser

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

commit 465c8c13c433cc9d959dcf451b7f8f4ec8772759
parent b773c5045f80e154b63b9ba459e289ab554049c3
Author: Dan Baker <dbaker@mozilla.com>
Date:   Thu, 23 Oct 2025 14:53:07 -0600

Bug 1995393 - Vendor libwebrtc from 91c1c68065

Upstream commit: https://webrtc.googlesource.com/src/+/91c1c68065141097bb5e16f33b2981174f4fdc5b
    Recompile clang-tidy at least every 30 days

    This CL also takes out NOLINT statements that were
    added because I was running a too-old clang-tidy.

    Suggestions for better algorithms welcome.

    Bug: webrtc:424706384
    Change-Id: Ib4f237e15ee65168d65d17c7bda9ec3f1a881b7f
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/404160
    Reviewed-by: Jeremy Leconte <jleconte@google.com>
    Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45328}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/common_audio/resampler/sinc_resampler.cc | 7-------
Mthird_party/libwebrtc/modules/audio_coding/codecs/opus/test/blocker.cc | 1-
Mthird_party/libwebrtc/tools_webrtc/apply_clang_tidy.py | 10+++++++++-
4 files changed, 11 insertions(+), 11 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-23T20:50:26.598307+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T20:52:52.753539+00:00. # base of lastest vendoring -5c0e910544 +91c1c68065 diff --git a/third_party/libwebrtc/common_audio/resampler/sinc_resampler.cc b/third_party/libwebrtc/common_audio/resampler/sinc_resampler.cc @@ -163,17 +163,12 @@ SincResampler::SincResampler(double io_sample_rate_ratio, Flush(); RTC_DCHECK_GT(block_size_, kKernelSize); - // NOLINTBEGIN (readability-redundant-smartptr-get) - // clang-tidy tries to remove the .get() in calls to sizeof(). This will - // not compile. - // Bug report ID: 437035885 memset(kernel_storage_.get(), 0, sizeof(*kernel_storage_.get()) * kKernelStorageSize); memset(kernel_pre_sinc_storage_.get(), 0, sizeof(*kernel_pre_sinc_storage_.get()) * kKernelStorageSize); memset(kernel_window_storage_.get(), 0, sizeof(*kernel_window_storage_.get()) * kKernelStorageSize); - // NOLINTEND InitializeKernel(); } @@ -324,7 +319,6 @@ void SincResampler::Resample(size_t frames, float* destination) { // Step (3) -- Copy r3_, r4_ to r1_, r2_. // This wraps the last input frames back to the start of the buffer. - // NOLINTNEXTLINE(readability-redundant-smartptr-get) memcpy(r1_, r3_, sizeof(*input_buffer_.get()) * kKernelSize); // Step (4) -- Reinitialize regions if necessary. @@ -345,7 +339,6 @@ size_t SincResampler::ChunkSize() const { void SincResampler::Flush() { virtual_source_idx_ = 0; buffer_primed_ = false; - // NOLINTNEXTLINE(readability-redundant-smartptr-get) memset(input_buffer_.get(), 0, sizeof(*input_buffer_.get()) * input_buffer_size_); UpdateRegions(false); diff --git a/third_party/libwebrtc/modules/audio_coding/codecs/opus/test/blocker.cc b/third_party/libwebrtc/modules/audio_coding/codecs/opus/test/blocker.cc @@ -119,7 +119,6 @@ Blocker::Blocker(size_t chunk_size, RTC_CHECK_LE(num_output_channels_, num_input_channels_); RTC_CHECK_LE(shift_amount_, block_size_); - // NOLINTNEXTLINE(readability-redundant-smartptr-get) memcpy(window_.get(), window, block_size_ * sizeof(*window_.get())); input_buffer_.MoveReadPositionBackward(initial_delay_); } diff --git a/third_party/libwebrtc/tools_webrtc/apply_clang_tidy.py b/third_party/libwebrtc/tools_webrtc/apply_clang_tidy.py @@ -33,6 +33,7 @@ # https://chromium.googlesource.com/chromium/src/+/main/docs/clang_tidy.md import argparse +import time import pathlib import subprocess @@ -69,7 +70,14 @@ def _build_clang_tools(work_dir: pathlib.Path) -> None: if pathlib.Path(work_dir, _TIDY_RUNNER).exists() and pathlib.Path( work_dir, _TIDY_BINARY).exists() and pathlib.Path( work_dir, _REPLACEMENTS_BINARY).exists(): - return + # Assume that tidy updates at least once every 30 days, and + # recompile it if it's more than 30 days old. + tidy_binary_path = pathlib.Path(work_dir, _TIDY_BINARY) + age_in_seconds = time.time() - tidy_binary_path.stat().st_mtime + age_in_days = age_in_seconds / (24 * 60 * 60) + if age_in_days < 30: + return + print("Binary is %d days old - recompiling" % age_in_days) print("Fetching and building clang-tidy") build_clang_tools_cmd = (_TIDY_BUILD, "--fetch", work_dir, "clang-tidy", "clang-apply-replacements")