summaryrefslogtreecommitdiff
path: root/www-client/chromium/files
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2024-02-03 22:15:30 -0500
committerGravatar Chris Xiong <chirs241097@gmail.com> 2024-02-03 22:16:17 -0500
commit47aa9839c7d8d8d064b022b5d5d9c5ed05fd726f (patch)
tree40115babcd2765bb5e964529febbcdc273a1dca5 /www-client/chromium/files
parent254cc740cb2c2f122f20d97a11992af5420acdc5 (diff)
downloadppo-47aa9839c7d8d8d064b022b5d5d9c5ed05fd726f.tar.xz
chromium 123.0.6272.2
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r--www-client/chromium/files/chromium-123-EnumTable-crash.patch76
-rw-r--r--www-client/chromium/files/chromium-123-qrgen-disablerust.patch92
2 files changed, 168 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-123-EnumTable-crash.patch b/www-client/chromium/files/chromium-123-EnumTable-crash.patch
new file mode 100644
index 0000000..3c64789
--- /dev/null
+++ b/www-client/chromium/files/chromium-123-EnumTable-crash.patch
@@ -0,0 +1,76 @@
+diff --git a/components/media_router/common/providers/cast/channel/enum_table.h b/components/media_router/common/providers/cast/channel/enum_table.h
+index dd58e6cfea..a0fa270bf2 100644
+--- a/components/media_router/common/providers/cast/channel/enum_table.h
++++ b/components/media_router/common/providers/cast/channel/enum_table.h
+@@ -9,6 +9,7 @@
+ #include <cstring>
+ #include <optional>
+ #include <ostream>
++#include <vector>
+
+ #include "base/check_op.h"
+ #include "base/notreached.h"
+@@ -187,7 +188,6 @@ class
+ inline constexpr GenericEnumTableEntry(int32_t value);
+ inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
+
+- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
+ GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
+
+ private:
+@@ -253,7 +253,6 @@ class EnumTable {
+ constexpr Entry(E value, base::StringPiece str)
+ : GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
+
+- Entry(const Entry&) = delete;
+ Entry& operator=(const Entry&) = delete;
+ };
+
+@@ -312,15 +311,14 @@ class EnumTable {
+ if (is_sorted_) {
+ const std::size_t index = static_cast<std::size_t>(value);
+ if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
+- const auto& entry = data_.begin()[index];
++ const auto& entry = data_[index];
+ if (ANALYZER_ASSUME_TRUE(entry.has_str()))
+ return entry.str();
+ }
+ return std::nullopt;
+ }
+ return GenericEnumTableEntry::FindByValue(
+- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
+- data_.size(), static_cast<int32_t>(value));
++ &data_[0], data_.size(), static_cast<int32_t>(value));
+ }
+
+ // This overload of GetString is designed for cases where the argument is a
+@@ -348,8 +346,7 @@ class EnumTable {
+ // enum value directly.
+ std::optional<E> GetEnum(base::StringPiece str) const {
+ auto* entry = GenericEnumTableEntry::FindByString(
+- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
+- data_.size(), str);
++ &data_[0], data_.size(), str);
+ return entry ? static_cast<E>(entry->value) : std::optional<E>();
+ }
+
+@@ -364,7 +361,7 @@ class EnumTable {
+ // Align the data on a cache line boundary.
+ alignas(64)
+ #endif
+- std::initializer_list<Entry> data_;
++ const std::vector<Entry> data_;
+ bool is_sorted_;
+
+ constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
+@@ -376,8 +373,8 @@ class EnumTable {
+
+ for (std::size_t i = 0; i < data.size(); i++) {
+ for (std::size_t j = i + 1; j < data.size(); j++) {
+- const Entry& ei = data.begin()[i];
+- const Entry& ej = data.begin()[j];
++ const Entry& ei = data[i];
++ const Entry& ej = data[j];
+ DCHECK(ei.value != ej.value)
+ << "Found duplicate enum values at indices " << i << " and " << j;
+ DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))
diff --git a/www-client/chromium/files/chromium-123-qrgen-disablerust.patch b/www-client/chromium/files/chromium-123-qrgen-disablerust.patch
new file mode 100644
index 0000000..ef58655
--- /dev/null
+++ b/www-client/chromium/files/chromium-123-qrgen-disablerust.patch
@@ -0,0 +1,92 @@
+diff --git a/components/qr_code_generator/BUILD.gn b/components/qr_code_generator/BUILD.gn
+index c45d0c4039..ba2e27878b 100644
+--- a/components/qr_code_generator/BUILD.gn
++++ b/components/qr_code_generator/BUILD.gn
+@@ -3,7 +3,7 @@
+ # found in the LICENSE file.
+
+ import("//build/buildflag_header.gni")
+-import("//build/config/rust.gni")
++# import("//build/config/rust.gni")
+ import("//testing/libfuzzer/fuzzer_test.gni")
+
+ declare_args() {
+@@ -40,20 +40,20 @@ source_set("qr_code_generator") {
+ ]
+ deps = [
+ ":qr_code_generator_features",
+- ":qr_code_generator_ffi_glue",
++# ":qr_code_generator_ffi_glue",
+ "//base",
+ ]
+ public_deps = [ "//base" ]
+ }
+
+-rust_static_library("qr_code_generator_ffi_glue") {
+- allow_unsafe = true # Needed for FFI that underpins the `cxx` crate.
+- crate_root = "qr_code_generator_ffi_glue.rs"
+- sources = [ "qr_code_generator_ffi_glue.rs" ]
+- cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ]
+- visibility = [ ":qr_code_generator" ]
+- deps = [ "//third_party/rust/qr_code/v2:lib" ]
+-}
++#rust_static_library("qr_code_generator_ffi_glue") {
++# allow_unsafe = true # Needed for FFI that underpins the `cxx` crate.
++# crate_root = "qr_code_generator_ffi_glue.rs"
++# sources = [ "qr_code_generator_ffi_glue.rs" ]
++# cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ]
++# visibility = [ ":qr_code_generator" ]
++# deps = [ "//third_party/rust/qr_code/v2:lib" ]
++#}
+
+ source_set("unit_tests") {
+ testonly = true
+diff --git a/components/qr_code_generator/qr_code_generator.cc b/components/qr_code_generator/qr_code_generator.cc
+index b1531f5026..da5a4c5382 100644
+--- a/components/qr_code_generator/qr_code_generator.cc
++++ b/components/qr_code_generator/qr_code_generator.cc
+@@ -11,12 +11,12 @@
+ #include <vector>
+
+ #include "base/check_op.h"
+-#include "base/containers/span_rust.h"
++//#include "base/containers/span_rust.h"
+ #include "base/memory/raw_ptr.h"
+ #include "base/notreached.h"
+ #include "base/numerics/safe_conversions.h"
+ #include "components/qr_code_generator/features.h"
+-#include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h"
++//#include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h"
+
+ namespace qr_code_generator {
+
+@@ -572,7 +572,7 @@ size_t SegmentSpanLength(base::span<const QRCodeGenerator::Segment> segments) {
+ return sum;
+ }
+
+-std::optional<QRCodeGenerator::GeneratedCode> GenerateQrCodeUsingRust(
++/*std::optional<QRCodeGenerator::GeneratedCode> GenerateQrCodeUsingRust(
+ base::span<const uint8_t> in,
+ std::optional<int> min_version) {
+ rust::Slice<const uint8_t> rs_in = base::SpanToRustSlice(in);
+@@ -595,7 +595,7 @@ std::optional<QRCodeGenerator::GeneratedCode> GenerateQrCodeUsingRust(
+ code.qr_size = base::checked_cast<int>(result_width);
+ CHECK_EQ(code.data.size(), static_cast<size_t>(code.qr_size * code.qr_size));
+ return code;
+-}
++}*/
+
+ } // namespace
+
+@@ -613,9 +613,9 @@ QRCodeGenerator::GeneratedCode::~GeneratedCode() = default;
+ std::optional<QRCodeGenerator::GeneratedCode> QRCodeGenerator::Generate(
+ base::span<const uint8_t> in,
+ std::optional<int> min_version) {
+- if (IsRustyQrCodeGeneratorFeatureEnabled()) {
++ /*if (IsRustyQrCodeGeneratorFeatureEnabled()) {
+ return GenerateQrCodeUsingRust(in, min_version);
+- }
++ }*/
+
+ if (in.size() > kMaxInputSize) {
+ return std::nullopt;