7
0
Files
nodejs-electron/re2-11-StringPiece.patch
Bruno Pitrus 7b259750d2 Accepting request 1110783 from home:dziobian:gulgul-ultron:19
- Update to 25.8.0
  * ABI break: NODE_MODULE_VERSION is now 116
  * Chromium 114.0.5735.289
  * Node 18.15.0
  * V8 11.4
  * Removed BrowserWindow scroll-touch-* events (since Electron 23)
  * Removed webContents.{de,in}crementCapturerCount(stayHidden, stayAwake) (since Electron 23)
  * Removed JXL image format support (since Electron 23)
  * API Changed: nativeImage.createThumbnailFromPath(path, size) (since Electron 24)
- Use bundled vpx on Fedora ≤37 and Leap
- Use bundled aom on Fedora and Leap
- Drop support for Fedora 36 which is EOL
- Drop upstreamed patches
  * CVE-2022-43548.patch
  * aggregatable_attribution_utils-do-not-assume-abseil-ABI.patch
  * angle-ShaderVars-missing-uint32_t.patch
  * blink-gcc13-missing-headers.patch
  * bluetooth_uuid-missing-uint8_t.patch
  * broker_file_permission-missing-uint64_t.patch
  * chromium-108-abseil-shims.patch
  * components-gcc13-missing-headers.patch 
  * crashpad-elf_image_reader-ProgramHeaderTableSpecific-expected-unqualified-id.patch
  * d0aa9ad.patch
  * document_loader-private-DecodedBodyData.patch
  * effect_paint_property_node-Wchanges-meaning.patch
  * electron_serial_delegate-ambiguous-Observer.patch
  * extensions-gcc13-missing-headers.patch
  * first_party_set_parser-IssueWithMetadata-no-known-conversion.patch
  * gpu_feature_info-missing-uint32_t.patch
  * half_float-Wstrict-aliasing.patch
  * ipcz-buffer_id-Wnarrowing.patch
  * ipcz-safe_math-Wuninitialized.patch
  * net-gcc13-missing-headers.patch
  * net-third_party-quiche-gcc13-missing-headers.patch
  * one_writer_seqlock-missing-uintptr_t.patch
  * openscreen-gcc13-missing-headers.patch
  * passwords_counter-Wsubobject-linkage.patch
  * perfetto-uuid-missing-uint8_t.patch
  * print_dialog_gtk-no-kEnableOopPrintDriversJobPrint.patch
  * profiler-missing-uintptr_t.patch
  * reproducible-config.gypi.patch
  * select_file_dialog_linux_kde-Wodr.patch
  * shim_headers-fix-ninja.patch
  * static_constructors-Wstrict-aliasing.patch
  * string_hasher-type-pun-UB-causes-heap-corruption.patch
  * swiftshader-Constants-Wstrict-aliasing.patch
  * swiftshader-Half-Wstrict-aliasing.patch
  * swiftshader-LRUCache-missing-uint64_t.patch
  * target_property-missing-uint32_t.patch
  * ui-gcc13-missing-headers.patch
  * unzip-Wsubobject-linkage.patch
  * v8_initializer-PageAllocator-fpermissive.patch
  * vector_math_impl-Wstrict-aliasing.patch
  * web_contents_impl-Wsubobject-linkage.patch
  * webgl_image_conversion-Wstrict-aliasing.patch
  * webrtc-base64-missing-uint8_t.patch
  * xr_cube_map-Wstrict-aliasing.patch
- Drop no longer relevant patches`
  * chromium-norar.patch
  * electron-13-fix-sql-virtualcursor-type.patch
  * enable-jxl.patch
  * system-jsoncpp.patch
- Add patches to build with system libs
  * abseil-remove-unused-targets.patch
  * highway.gn
  * system-wayland.patch
- Add patches to fix build errors
  * absl-uint128-do-not-assume-abi.patch
  * cpu-missing-uint8_t.patch
  * electron-24-components-missing-headers.patch
  * electron_api_app-GetPathConstant-non-constexpr.patch
  * electron_browser_context-missing-variant.patch
  * mojo_ukm_recorder-missing-WrapUnique.patch
- Conditionally reverse upstream changes to build against stable avif
  * avif_image_decoder-repetitionCount-clli.patch
- …and harfbuzz 4
  * harfbuzz-replace-HbScopedPointer.patch
- …and icu 69
  * v8-regexp-parser-UCHAR_BASIC_EMOJI.patch
- …and wayland 19
  * wayland-WL-SINCE-VERSION.patch
  * wayland_data_drag_controller-WL_SURFACE_OFFSET_SINCE_VERSION.patch
- Add backported chrome-gpu-does-not-load.patch

OBS-URL: https://build.opensuse.org/request/show/1110783
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=89
2023-09-13 04:57:45 +00:00

365 lines
16 KiB
Diff

From 3f6cd624418e2aacd7f2802df188585db78044da Mon Sep 17 00:00:00 2001
From: Paul Wankadia <junyer@chromium.org>
Date: Tue, 30 May 2023 19:53:20 +0000
Subject: [PATCH] Don't pass nullptr to construct re2::StringPiece.
This avoids breakage when re2::StringPiece becomes
an alias for absl::string_view/std::string_view.
Also, remove an unused variable that will start
upsetting the compiler for some reason.
Bug: 1447090
Change-Id: I5d2ffdb261391c0f0f3eaac706eb47a3cf108125
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4569968
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Paul Wankadia <junyer@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1150783}
---
.../browser_switcher/alternative_browser_driver_posix.cc | 2 +-
components/feedback/redaction_tool/redaction_tool.cc | 2 +-
extensions/browser/api/web_request/form_data_parser.cc | 3 +--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/chrome/browser/browser_switcher/alternative_browser_driver_posix.cc b/chrome/browser/browser_switcher/alternative_browser_driver_posix.cc
index b2f7cd8ed0788f..272b933bab9625 100644
--- a/chrome/browser/browser_switcher/alternative_browser_driver_posix.cc
+++ b/chrome/browser/browser_switcher/alternative_browser_driver_posix.cc
@@ -89,7 +89,7 @@ void ExpandEnvironmentVariables(std::string* arg) {
static re2::LazyRE2 re = {
"\\$\\{([a-zA-Z_][a-zA-Z_0-9]*)\\}|\\$([a-zA-Z_][a-zA-Z_0-9]*)"};
std::string out;
- re2::StringPiece submatch[3] = {nullptr};
+ re2::StringPiece submatch[3] = {};
size_t start = 0;
bool matched = false;
while (re->Match(*arg, start, arg->size(), re2::RE2::Anchor::UNANCHORED,
diff --git a/components/feedback/redaction_tool/redaction_tool.cc b/components/feedback/redaction_tool/redaction_tool.cc
index 876e8da509aa74..c81806e0fb029f 100644
--- a/components/feedback/redaction_tool/redaction_tool.cc
+++ b/components/feedback/redaction_tool/redaction_tool.cc
@@ -1081,7 +1081,7 @@ std::string RedactionTool::RedactCustomPatternWithContext(
// Keep consuming, building up a result string as we go.
re2::StringPiece text(input);
re2::StringPiece skipped;
- re2::StringPiece pre_match, pre_matched_id, matched_id, post_matched_id;
+ re2::StringPiece pre_matched_id, matched_id, post_matched_id;
while (FindAndConsumeAndGetSkipped(&text, *re, &skipped, &pre_matched_id,
&matched_id, &post_matched_id)) {
std::string matched_id_as_string(matched_id);
diff --git a/extensions/browser/api/web_request/form_data_parser.cc b/extensions/browser/api/web_request/form_data_parser.cc
index 6d516e86c9f1ed..cf73709add6d68 100644
--- a/extensions/browser/api/web_request/form_data_parser.cc
+++ b/extensions/browser/api/web_request/form_data_parser.cc
@@ -372,8 +372,7 @@ std::unique_ptr<FormDataParser> FormDataParser::CreateFromContentTypeHeader(
FormDataParser::FormDataParser() = default;
FormDataParserUrlEncoded::FormDataParserUrlEncoded()
- : source_(nullptr),
- source_set_(false),
+ : source_set_(false),
source_malformed_(false),
arg_name_(&name_),
arg_value_(&value_),
From 68c426f8160021247839f29c88748688c1aa6816 Mon Sep 17 00:00:00 2001
From: Paul Wankadia <junyer@chromium.org>
Date: Fri, 19 May 2023 18:42:56 +0000
Subject: [PATCH] Replace uses of re2::StringPiece::as_string().
RE2 has taken a dependency on Abseil. re2::StringPiece is (for now)
an alias; its old member functions no longer exist. This CL is just
one of many needed to unblock updating Chromium's copy of RE2 soon.
Bug: 1447090
Change-Id: I917defc8d2df5c66c25f44a94ee9df5eb6ba1fda
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4549043
Auto-Submit: Paul Wankadia <junyer@chromium.org>
Commit-Queue: Paul Wankadia <junyer@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146625}
---
components/feedback/redaction_tool/redaction_tool.cc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/components/feedback/redaction_tool/redaction_tool.cc b/components/feedback/redaction_tool/redaction_tool.cc
index f130fe7013a002..a623db131d2f48 100644
--- a/components/feedback/redaction_tool/redaction_tool.cc
+++ b/components/feedback/redaction_tool/redaction_tool.cc
@@ -815,7 +815,8 @@ std::string RedactionTool::RedactAndroidAppStoragePaths(
// - Otherwise, remove all the characters in the component but the first
// one.
// - If the original component has 2 or more bytes, add '_'.
- const base::FilePath path(app_specific.as_string());
+ const base::FilePath path(
+ std::string(app_specific.data(), app_specific.size()));
std::vector<std::string> components = path.GetComponents();
DCHECK(!components.empty());
@@ -831,7 +832,7 @@ std::string RedactionTool::RedactAndroidAppStoragePaths(
}
if (detected != nullptr) {
(*detected)[PIIType::kAndroidAppStoragePath].insert(
- app_specific.as_string());
+ std::string(app_specific.data(), app_specific.size()));
}
}
From efc4763ff060a30dbbadc8f31a6fb0899e00a564 Mon Sep 17 00:00:00 2001
From: Paul Wankadia <junyer@chromium.org>
Date: Fri, 19 May 2023 18:43:33 +0000
Subject: [PATCH] Replace uses of re2::StringPiece::AppendToString().
RE2 has taken a dependency on Abseil. re2::StringPiece is (for now)
an alias; its old member functions no longer exist. This CL is just
one of many needed to unblock updating Chromium's copy of RE2 soon.
Bug: 1447090
Change-Id: I335e63709193b01d0d4e2e2b7ecfaa205e06877d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4547047
Auto-Submit: Paul Wankadia <junyer@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Paul Wankadia <junyer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146626}
---
.../ash/network_health_data_collector.cc | 4 +-
.../ash/ui_hierarchy_data_collector.cc | 4 +-
.../feedback/redaction_tool/redaction_tool.cc | 66 +++++++++----------
3 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/chrome/browser/support_tool/ash/ui_hierarchy_data_collector.cc b/chrome/browser/support_tool/ash/ui_hierarchy_data_collector.cc
index 3bb5af9c1c56c6..3012f275be4793 100644
--- a/chrome/browser/support_tool/ash/ui_hierarchy_data_collector.cc
+++ b/chrome/browser/support_tool/ash/ui_hierarchy_data_collector.cc
@@ -84,12 +84,12 @@ std::string UiHierarchyDataCollector::RemoveWindowTitles(
while (re2::RE2::Consume(&input, regex_pattern, &skipped_part,
&matched_window_title)) {
- skipped_part.AppendToString(&redacted);
+ redacted.append(skipped_part.data(), skipped_part.size());
redacted += "title=<REDACTED>\n";
}
// Append the rest of the input to `redacted`. Only the unmatched last part
// will be present in the `input` as we're using Consume() function.
- input.AppendToString(&redacted);
+ redacted.append(input.data(), input.size());
return redacted;
}
diff --git a/components/feedback/redaction_tool/redaction_tool.cc b/components/feedback/redaction_tool/redaction_tool.cc
index a623db131d2f48..07d19502f8d23b 100644
--- a/components/feedback/redaction_tool/redaction_tool.cc
+++ b/components/feedback/redaction_tool/redaction_tool.cc
@@ -703,11 +703,11 @@ std::string RedactionTool::RedactMACAddresses(
if (detected != nullptr) {
(*detected)[PIIType::kMACAddress].insert(mac);
}
- skipped.AppendToString(&result);
+ result.append(skipped.data(), skipped.size());
result += replacement_mac;
}
- text.AppendToString(&result);
+ result.append(text.data(), text.size());
UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName,
PIIType::kMACAddress);
@@ -733,8 +733,8 @@ std::string RedactionTool::RedactHashes(
re2::StringPiece skipped, pre_whitespace, hash_prefix, hash_suffix;
while (FindAndConsumeAndGetSkipped(&text, *hash_re, &skipped, &pre_whitespace,
&hash_prefix, &hash_suffix)) {
- skipped.AppendToString(&result);
- pre_whitespace.AppendToString(&result);
+ result.append(skipped.data(), skipped.size());
+ result.append(pre_whitespace.data(), pre_whitespace.size());
// Check if it's a valid length for our hashes or if we need to skip due to
// the whitespace check.
@@ -742,8 +742,8 @@ std::string RedactionTool::RedactHashes(
if ((hash_length != 32 && hash_length != 40 && hash_length != 64) ||
(hash_length == 32 && pre_whitespace.length() >= 3)) {
// This is not a hash string, skip it.
- hash_prefix.AppendToString(&result);
- hash_suffix.AppendToString(&result);
+ result.append(hash_prefix.data(), hash_prefix.size());
+ result.append(hash_suffix.data(), hash_suffix.size());
continue;
}
@@ -768,7 +768,7 @@ std::string RedactionTool::RedactHashes(
result += replacement_hash;
}
- text.AppendToString(&result);
+ result.append(text.data(), text.size());
UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName,
PIIType::kStableIdentifier);
@@ -806,8 +806,8 @@ std::string RedactionTool::RedactAndroidAppStoragePaths(
while (FindAndConsumeAndGetSkipped(&text, *path_re, &skipped, &path_prefix,
&pre_data, &post_data, &app_specific)) {
// We can record these parts as-is.
- skipped.AppendToString(&result);
- path_prefix.AppendToString(&result);
+ result.append(skipped.data(), skipped.size());
+ result.append(path_prefix.data(), path_prefix.size());
// |app_specific| has to be redacted. First, convert it into components,
// and then redact each component as follows:
@@ -837,7 +837,7 @@ std::string RedactionTool::RedactAndroidAppStoragePaths(
}
}
- text.AppendToString(&result);
+ result.append(text.data(), text.size());
UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName,
PIIType::kAndroidAppStoragePath);
@@ -1089,12 +1089,12 @@ std::string RedactionTool::RedactCustomPatternWithContext(
if (detected != nullptr) {
(*detected)[pattern.pii_type].insert(matched_id_as_string);
}
- skipped.AppendToString(&result);
- pre_matched_id.AppendToString(&result);
+ result.append(skipped.data(), skipped.size());
+ result.append(pre_matched_id.data(), pre_matched_id.size());
result += replacement_id;
- post_matched_id.AppendToString(&result);
+ result.append(post_matched_id.data(), post_matched_id.size());
}
- text.AppendToString(&result);
+ result.append(text.data(), text.size());
UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName,
pattern.pii_type);
@@ -1176,8 +1176,8 @@ std::string RedactionTool::RedactCustomPatternWithoutContext(
re2::StringPiece matched_id;
while (FindAndConsumeAndGetSkipped(&text, *re, &skipped, &matched_id)) {
if (IsUrlExempt(matched_id, first_party_extension_ids_)) {
- skipped.AppendToString(&result);
- matched_id.AppendToString(&result);
+ result.append(skipped.data(), skipped.size());
+ result.append(matched_id.data(), matched_id.size());
continue;
}
std::string matched_id_as_string(matched_id);
@@ -1188,8 +1188,8 @@ std::string RedactionTool::RedactCustomPatternWithoutContext(
// Double-check overly opportunistic IPv4 address matching.
if ((strcmp("IPv4", pattern.alias) == 0) &&
ShouldSkipIPAddress(skipped)) {
- skipped.AppendToString(&result);
- matched_id.AppendToString(&result);
+ result.append(skipped.data(), skipped.size());
+ result.append(matched_id.data(), matched_id.size());
continue;
}
@@ -1211,10 +1211,10 @@ std::string RedactionTool::RedactCustomPatternWithoutContext(
}
}
- skipped.AppendToString(&result);
+ result.append(skipped.data(), skipped.size());
result += replacement_id;
}
- text.AppendToString(&result);
+ result.append(text.data(), text.size());
UMA_HISTOGRAM_ENUMERATION(kFeedbackRedactionToolHistogramName,
pattern.pii_type);
From eee5a88144edad47597163db8f26687a5bd24915 Mon Sep 17 00:00:00 2001
From: Paul Wankadia <junyer@chromium.org>
Date: Tue, 23 May 2023 18:42:42 +0000
Subject: [PATCH] Replace uses of re2::StringPiece::contains().
RE2 has taken a dependency on Abseil. re2::StringPiece is (for now)
an alias; its old member functions no longer exist. This CL is just
one of many needed to unblock updating Chromium's copy of RE2 soon.
Bug: 1447090
Change-Id: I9d4c0dff881330dd8fcb4805d63845297a203fdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4547053
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Paul Wankadia <junyer@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1148060}
---
components/feedback/redaction_tool/redaction_tool.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/feedback/redaction_tool/redaction_tool.cc b/components/feedback/redaction_tool/redaction_tool.cc
index 07d19502f8d23b..814ac96d80a5a5 100644
--- a/components/feedback/redaction_tool/redaction_tool.cc
+++ b/components/feedback/redaction_tool/redaction_tool.cc
@@ -1105,7 +1105,7 @@ std::string RedactionTool::RedactCustomPatternWithContext(
bool IsUrlExempt(re2::StringPiece url,
const char* const* first_party_extension_ids) {
// We do not exempt anything with a query parameter.
- if (url.contains("?")) {
+ if (url.find("?") != re2::StringPiece::npos) {
return false;
}
From bbe41e215c64baf22faf257e7a9f8ce7bf7bc337 Mon Sep 17 00:00:00 2001
From: Paul Wankadia <junyer@chromium.org>
Date: Fri, 19 May 2023 19:13:27 +0000
Subject: [PATCH] Replace uses of re2::StringPiece::set().
RE2 has taken a dependency on Abseil. re2::StringPiece is (for now)
an alias; its old member functions no longer exist. This CL is just
one of many needed to unblock updating Chromium's copy of RE2 soon.
Bug: 1447090
Change-Id: I23e94fd3b55c615f4cbe03350ede9bf1eaa4f73d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4549044
Owners-Override: Nico Weber <thakis@chromium.org>
Auto-Submit: Paul Wankadia <junyer@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Muhammad Hasan Khan <mhasank@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146652}
---
.../browser/ash/arc/policy/managed_configuration_variables.cc | 2 +-
extensions/browser/api/web_request/form_data_parser.cc | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/chrome/browser/ash/arc/policy/managed_configuration_variables.cc b/chrome/browser/ash/arc/policy/managed_configuration_variables.cc
index 67ff219e247f18..13f90e53993954 100644
--- a/chrome/browser/ash/arc/policy/managed_configuration_variables.cc
+++ b/chrome/browser/ash/arc/policy/managed_configuration_variables.cc
@@ -193,7 +193,7 @@ std::string SearchAndReplace(
DCHECK(search_input.length() >= prefix_size + capture.length());
size_t remaining_size =
search_input.length() - (prefix_size + capture.length());
- search_input.set(capture.end(), remaining_size);
+ search_input = re2::StringPiece(capture.end(), remaining_size);
}
// Output the remaining |search_input|.
output.emplace_back(search_input.data(), search_input.length());
diff --git a/extensions/browser/api/web_request/form_data_parser.cc b/extensions/browser/api/web_request/form_data_parser.cc
index b7ddf52ab9c838..6d516e86c9f1ed 100644
--- a/extensions/browser/api/web_request/form_data_parser.cc
+++ b/extensions/browser/api/web_request/form_data_parser.cc
@@ -423,7 +423,7 @@ bool FormDataParserUrlEncoded::GetNextNameValue(Result* result) {
bool FormDataParserUrlEncoded::SetSource(base::StringPiece source) {
if (source_set_)
return false; // We do not allow multiple sources for this parser.
- source_.set(source.data(), source.size());
+ source_ = re2::StringPiece(source.data(), source.size());
source_set_ = true;
source_malformed_ = false;
return true;
@@ -567,7 +567,7 @@ bool FormDataParserMultipart::GetNextNameValue(Result* result) {
bool FormDataParserMultipart::SetSource(base::StringPiece source) {
if (source.data() == nullptr || !source_.empty())
return false;
- source_.set(source.data(), source.size());
+ source_ = re2::StringPiece(source.data(), source.size());
switch (state_) {
case STATE_INIT: