diff options
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r-- | www-client/chromium/files/chromium-121-qrgen-disablerust.patch | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-121-qrgen-disablerust.patch b/www-client/chromium/files/chromium-121-qrgen-disablerust.patch new file mode 100644 index 0000000..fe6bf28 --- /dev/null +++ b/www-client/chromium/files/chromium-121-qrgen-disablerust.patch @@ -0,0 +1,92 @@ +diff --git a/components/qr_code_generator/BUILD.gn b/components/qr_code_generator/BUILD.gn +index dddcc726b7..3545742d9d 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() { +@@ -39,20 +39,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 f7d2df0775..4fadc4e1ae 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; + } + +-absl::optional<QRCodeGenerator::GeneratedCode> GenerateQrCodeUsingRust( ++/*absl::optional<QRCodeGenerator::GeneratedCode> GenerateQrCodeUsingRust( + base::span<const uint8_t> in, + absl::optional<int> min_version) { + rust::Slice<const uint8_t> rs_in = base::SpanToRustSlice(in); +@@ -595,7 +595,7 @@ absl::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 + +@@ -617,9 +617,9 @@ absl::optional<QRCodeGenerator::GeneratedCode> QRCodeGenerator::Generate( + return absl::nullopt; + } + +- if (IsRustyQrCodeGeneratorFeatureEnabled()) { ++ /*if (IsRustyQrCodeGeneratorFeatureEnabled()) { + return GenerateQrCodeUsingRust(in, min_version); +- } ++ }*/ + + std::vector<Segment> segments; + const QRVersionInfo* version_info = nullptr; |