git: 6166c62620dc - main - www/chromium: unbreak build on i386

From: Robert Nagy <rnagy_at_FreeBSD.org>
Date: Sun, 25 Feb 2024 20:11:20 UTC
The branch main has been updated by rnagy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6166c62620dcd2a760e4306bd8a33716cdfb6bb0

commit 6166c62620dcd2a760e4306bd8a33716cdfb6bb0
Author:     Robert Nagy <rnagy@FreeBSD.org>
AuthorDate: 2024-02-25 20:11:00 +0000
Commit:     Robert Nagy <rnagy@FreeBSD.org>
CommitDate: 2024-02-25 20:11:15 +0000

    www/chromium: unbreak build on i386
---
 ...party_perfetto_src_trace__processor_db_column.h | 15 ---------------
 ..._trace__processor_db_column_numeric__storage.cc | 22 ++++++++++------------
 2 files changed, 10 insertions(+), 27 deletions(-)

diff --git a/www/chromium/files/patch-third__party_perfetto_src_trace__processor_db_column.h b/www/chromium/files/patch-third__party_perfetto_src_trace__processor_db_column.h
deleted file mode 100644
index 1eac1a4617f9..000000000000
--- a/www/chromium/files/patch-third__party_perfetto_src_trace__processor_db_column.h
+++ /dev/null
@@ -1,15 +0,0 @@
---- third_party/perfetto/src/trace_processor/db/column.h.orig	2024-02-06 12:08:38 UTC
-+++ third_party/perfetto/src/trace_processor/db/column.h
-@@ -48,6 +48,12 @@ template <>
- struct ColumnTypeHelper<int64_t> {
-   static constexpr ColumnType ToColumnType() { return ColumnType::kInt64; }
- };
-+#if (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__i386__)
-+template <>
-+struct ColumnTypeHelper<long double> {
-+  static constexpr ColumnType ToColumnType() { return ColumnType::kDouble; }
-+};
-+#endif
- template <>
- struct ColumnTypeHelper<double> {
-   static constexpr ColumnType ToColumnType() { return ColumnType::kDouble; }
diff --git a/www/chromium/files/patch-third__party_perfetto_src_trace__processor_db_column_numeric__storage.cc b/www/chromium/files/patch-third__party_perfetto_src_trace__processor_db_column_numeric__storage.cc
index 3662d9018c68..54b343933318 100644
--- a/www/chromium/files/patch-third__party_perfetto_src_trace__processor_db_column_numeric__storage.cc
+++ b/www/chromium/files/patch-third__party_perfetto_src_trace__processor_db_column_numeric__storage.cc
@@ -1,16 +1,14 @@
---- third_party/perfetto/src/trace_processor/db/column/numeric_storage.cc.orig	2024-02-23 21:04:38 UTC
+--- third_party/perfetto/src/trace_processor/db/column/numeric_storage.cc.orig	2024-02-25 20:08:06 UTC
 +++ third_party/perfetto/src/trace_processor/db/column/numeric_storage.cc
-@@ -494,8 +494,13 @@ BitVector NumericStorageBase::LinearSearchInternal(Fil
-   } else if (const auto* i32 = std::get_if<int32_t>(&val)) {
-     auto* start = static_cast<const int32_t*>(data_) + range.start;
-     TypedLinearSearch(*i32, start, op, builder);
+@@ -39,7 +39,11 @@ namespace trace_processor {
+ namespace column {
+ namespace {
+ 
 +#if (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__i386__)
-+  } else if (const auto* db = std::get_if<long double>(&*val)) {
-+    auto* start = static_cast<const long double*>(data_) + range.start;
++using NumericValue = std::variant<uint32_t, int32_t, int64_t, double>;
 +#else
-   } else if (const auto* db = std::get_if<double>(&val)) {
-     auto* start = static_cast<const double*>(data_) + range.start;
+ using NumericValue = std::variant<uint32_t, int32_t, int64_t, double_t>;
 +#endif
-     TypedLinearSearch(*db, start, op, builder);
-   } else {
-     PERFETTO_DFATAL("Invalid");
+ 
+ // Using the fact that binary operators in std are operators() of classes, we
+ // can wrap those classes in variants and use them for std::visit in