tor-browser

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

commit 88f9579e94828b582d04a24497413e8554ca8b26
parent d03a3e08ccd8da59751a2621930261ba2a2d397b
Author: Michael van Straten <mvanstraten@mozilla.com>
Date:   Sat, 18 Oct 2025 16:37:57 +0000

Bug 1990985 - Apply mozilla patches for opentelemetry-cpp r=jari

Differential Revision: https://phabricator.services.mozilla.com/D266304

Diffstat:
Mthird_party/opentelemetry-cpp/api/include/opentelemetry/context/context_value.h | 8+-------
Mthird_party/opentelemetry-cpp/api/include/opentelemetry/std/variant.h | 8++++++--
2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/third_party/opentelemetry-cpp/api/include/opentelemetry/context/context_value.h b/third_party/opentelemetry-cpp/api/include/opentelemetry/context/context_value.h @@ -10,11 +10,6 @@ #include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE -namespace baggage -{ -class Baggage; -} // namespace baggage - namespace trace { class Span; @@ -29,7 +24,6 @@ using ContextValue = nostd::variant<nostd::monostate, uint64_t, double, nostd::shared_ptr<trace::Span>, - nostd::shared_ptr<trace::SpanContext>, - nostd::shared_ptr<baggage::Baggage>>; + nostd::shared_ptr<trace::SpanContext>>; } // namespace context OPENTELEMETRY_END_NAMESPACE diff --git a/third_party/opentelemetry-cpp/api/include/opentelemetry/std/variant.h b/third_party/opentelemetry-cpp/api/include/opentelemetry/std/variant.h @@ -220,9 +220,13 @@ inline constexpr bool holds_alternative(const variant<Ts...> &v) noexcept return v.index() == I; } -template <typename T, typename... Ts> -inline constexpr bool holds_alternative(const variant<Ts...> &v) noexcept +template <typename T, template<typename...> typename U, typename... Ts> +inline constexpr bool holds_alternative(const U<Ts...> &v) noexcept { + // Clang 18.1.7 on Ubuntu 24.04 does not disambiguate between this + // and std::holds_alternative if argument type is std::variant<Ts...> + static_assert(std::is_same_v<U<Ts...>, std::variant<Ts...>>, + "Unsupported argument type"); return std::holds_alternative<T, Ts...>(v); }