forked from pool/nodejs-electron
- Update to 33.3.1 * Drop 32-bit support * chromium 130.0.6723.170 * node 20.18.0 * v8 13.0 * Behavior Changed: frame properties may retrieve detached WebFrameMain instances or none at all * Behavior Changed: webContents property on login on app * Added a handler, app.setClientCertRequestPasswordHandler(handler), to help unlock cryptographic devices when a PIN is needed. * Added View.setBorderRadius(radius) for customizing the border radius of views—with compatibility for WebContentsView. * Extended navigationHistory API with 2 new functions for better history management. #42014 * see https://github.com/electron/electron/releases/tag/v33.0.0 and https://www.electronjs.org/blog/electron-33-0 for more - Disable aarch64 builds due to OBS hardware limits. Sorry. - Drop Leap 15.5 support - Drop no longer needed patches * absl-base-dynamic_annotations.patch * angle-State-constexpr.patch * chromium-124-shims.patch * color_provider-incomplete-ColorProviderInternal.patch * ConsumeRadii-linker-error.patch * Cr126-abseil-shims.patch * crashpad-use-system-abseil.patch * DesktopNativeWidgetAura-HandleActivationChanged-crash.patch * harfbuzz-replace-chromium-scoped-type.patch * harfbuzz-replace-HbScopedPointer.patch * http_auth_ntlm_mechanism-could-not-convert-to-base-span.patch * licenses.py-FileNotFoundError.patch * native_css_paint_definition-expected-unqualified-id.patch * page_popup_controller-missing-optional.patch * partition_alloc-no-lto.patch * preview_cancel_reason-missing-string.patch * quiche-QuicIntervalDeque-no-match-for-operator-mm.patch * real_time_reporting_bindings-forward-declaration.patch * run_segmenter-missing-optional.patch * skia-system-vulkan-headers.patch * system-zlib.patch * text_decoder-missing-optional.patch * wayland-proto-31-cursor-shape.patch - Drop libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch and replace it with more fine-grained reverts: * aom3.10-AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR.patch * aom3.10-AV1E_SET_AUTO_TILES.patch * webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch * webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR-2.patch - Drop the following revert: * bad-font-gc0000.patch * bad-font-gc000.patch * bad-font-gc00.patch * bad-font-gc0.patch * bad-font-gc11.patch * bad-font-gc1.patch * bad-font-gc2.patch * bad-font-gc3.patch - Add bsc1224178-font-gc.patch for a proper fix for bsc#1224178 deb#1067886 - Add backported or forwardable patches to fix build errors: * account_id-missing-optional.patch * css_attr_value_tainting-missing-once_flag.patch * electron_usb_delegate-incomplete-UsbDeviceInfo.patch * exception_context-missing-variant.patch * fix-build-without-service-discovery.patch * ip_protection_data_types-missing-optional.patch * skia_image_decoder_base-missing-stack.patch * vtt_scanner-missing-variant.patch * wayland_connection-Wchanges-meaning.patch - Add patches to fix build errors due to our changes: * build-without-speech-service.patch * chromium-123-qrcode.patch * chromium-125-cloud_authenticator.patch * chromium-127-crabby.patch * chromium-129-disable-H.264-video-parser-during-demuxing.patch * chromium-130-fontations.patch * cr130-abseil-remove-unused-deps.patch * cr130-absl-base.patch * delete-old-language-detection-which-uses-tflite.patch * fix-build-without-screen-ai.patch * private_aggregation_host-uint128.patch * remove-libphonenumber.patch * system-absl_algorithm.patch * wayland_version.patch - 15.6: use bundled vulkan and spirv headers - 15.6: revert upstream changes to build with old wayland * wayland-protocol-toplevel-icon.patch * wayland-protocol-toplevel-icon-2.patch * wayland-protocol-toplevel-drag.patch - Use bundled yuv everywhere due to system version being too old OBS-URL: https://build.opensuse.org/request/show/1237196 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=182
69 lines
2.1 KiB
Diff
69 lines
2.1 KiB
Diff
--- a/components/qr_code_generator/BUILD.gn
|
|
+++ b/components/qr_code_generator/BUILD.gn
|
|
@@ -38,24 +38,11 @@
|
|
"qr_code_generator.h",
|
|
]
|
|
deps = [
|
|
- ":qr_code_generator_ffi_glue",
|
|
"//base",
|
|
]
|
|
public_deps = [
|
|
":error",
|
|
"//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 = [
|
|
- ":error",
|
|
- "//third_party/rust/qr_code/v2:lib",
|
|
]
|
|
}
|
|
|
|
--- a/components/qr_code_generator/qr_code_generator.cc
|
|
+++ b/components/qr_code_generator/qr_code_generator.cc
|
|
@@ -8,9 +8,7 @@
|
|
#include <vector>
|
|
|
|
#include "base/check_op.h"
|
|
-#include "base/containers/span_rust.h"
|
|
#include "base/numerics/safe_conversions.h"
|
|
-#include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h"
|
|
|
|
namespace qr_code_generator {
|
|
|
|
@@ -22,27 +20,7 @@
|
|
base::expected<GeneratedCode, Error> GenerateCode(
|
|
base::span<const uint8_t> in,
|
|
std::optional<int> min_version) {
|
|
- rust::Slice<const uint8_t> rs_in = base::SpanToRustSlice(in);
|
|
-
|
|
- // `min_version` might come from a fuzzer and therefore we use a lenient
|
|
- // `saturated_cast` instead of a `checked_cast`.
|
|
- int16_t rs_min_version =
|
|
- base::saturated_cast<int16_t>(min_version.value_or(0));
|
|
-
|
|
- std::vector<uint8_t> result_pixels;
|
|
- size_t result_width = 0;
|
|
- Error result_error = Error::kUnknownError;
|
|
- bool result_is_success = generate_qr_code_using_rust(
|
|
- rs_in, rs_min_version, result_pixels, result_width, result_error);
|
|
-
|
|
- if (!result_is_success) {
|
|
- return base::unexpected(result_error);
|
|
- }
|
|
- GeneratedCode code;
|
|
- code.data = std::move(result_pixels);
|
|
- 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;
|
|
+ return base::unexpected(Error::kUnknownError);
|
|
}
|
|
|
|
} // namespace qr_code_generator
|