tor-browser

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

commit d05cd6a8b2bb795f466d60bcc6c2dfaf2b32c7b2
parent 256da5a1564af1913b1b91412e9997efcfdcd137
Author: Dan Baker <dbaker@mozilla.com>
Date:   Thu, 20 Nov 2025 13:26:26 -0700

Bug 2000941 - Vendor libwebrtc from b76e4d0916

Upstream commit: https://webrtc.googlesource.com/src/+/b76e4d091610ebdf7e875f5dac73918e42539c2f
    Constrain ArrayView constructors not to take over copy constructor

    Otherwise, a constructor template is inadvertently selected by overload
    resolution instead of the intended copy constructor, because the
    template is insufficiently constrained.

    This fixes the experimental "runtime-unintended-special-member-overload"
    clang-tidy check.

    Original-Author: Thomas Köppe <tkoeppe@google.com>
    Bug: webrtc:424706384
    Change-Id: Ie5f34a4cd8b00c81517ef696515eca7b6da4c986
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/407700
    Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45553}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/api/array_view.h | 38++++++++++++++++++++++----------------
2 files changed, 24 insertions(+), 18 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-11-20T20:23:51.375800+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-11-20T20:26:13.605074+00:00. # base of lastest vendoring -2d23c4e768 +b76e4d0916 diff --git a/third_party/libwebrtc/api/array_view.h b/third_party/libwebrtc/api/array_view.h @@ -213,18 +213,21 @@ class ArrayView final : public array_view_internal::ArrayViewBase<T, Size> { // N>, but not the other way around. We also don't allow conversion from // ArrayView<T> to ArrayView<T, N>, or from ArrayView<T, M> to ArrayView<T, // N> when M != N. - template < - typename U, - typename std::enable_if<Size != array_view_internal::kArrayViewVarSize && - HasDataAndSize<U, T>::value>::type* = nullptr> + template <typename U, + typename std::enable_if_t< + !std::is_same_v<ArrayView, std::remove_reference_t<U>> && + Size != array_view_internal::kArrayViewVarSize && + HasDataAndSize<U, T>::value>* = nullptr> ArrayView(U& u) // NOLINT : ArrayView(u.data(), u.size()) { static_assert(U::size() == Size, "Sizes must match exactly"); } - template < - typename U, - typename std::enable_if<Size != array_view_internal::kArrayViewVarSize && - HasDataAndSize<U, T>::value>::type* = nullptr> + + template <typename U, + typename std::enable_if_t< + !std::is_same_v<ArrayView, std::remove_reference_t<U>> && + Size != array_view_internal::kArrayViewVarSize && + HasDataAndSize<U, T>::value>* = nullptr> ArrayView(const U& u) // NOLINT(runtime/explicit) : ArrayView(u.data(), u.size()) { static_assert(U::size() == Size, "Sizes must match exactly"); @@ -241,16 +244,19 @@ class ArrayView final : public array_view_internal::ArrayViewBase<T, Size> { // const std::vector<T> to ArrayView<const T>, // Buffer to ArrayView<uint8_t> or ArrayView<const uint8_t>, and // const Buffer to ArrayView<const uint8_t>. - template < - typename U, - typename std::enable_if<Size == array_view_internal::kArrayViewVarSize && - HasDataAndSize<U, T>::value>::type* = nullptr> + template <typename U, + typename std::enable_if_t< + !std::is_same_v<ArrayView, std::remove_reference_t<U>> && + Size == array_view_internal::kArrayViewVarSize && + HasDataAndSize<U, T>::value>* = nullptr> ArrayView(U& u) // NOLINT : ArrayView(u.data(), u.size()) {} - template < - typename U, - typename std::enable_if<Size == array_view_internal::kArrayViewVarSize && - HasDataAndSize<U, T>::value>::type* = nullptr> + + template <typename U, + typename std::enable_if_t< + !std::is_same_v<ArrayView, std::remove_reference_t<U>> && + Size == array_view_internal::kArrayViewVarSize && + HasDataAndSize<U, T>::value>* = nullptr> ArrayView(const U& u) // NOLINT(runtime/explicit) : ArrayView(u.data(), u.size()) {}