File string_truncator-convert.patch of Package nodejs-electron
--- src/third_party/blink/renderer/platform/fonts/string_truncator.cc.orig 2025-04-16 14:36:33.038422986 +0200
+++ src/third_party/blink/renderer/platform/fonts/string_truncator.cc 2025-04-16 22:05:13.224674254 +0200
@@ -168,7 +168,7 @@ static String TruncateString(const Strin
DCHECK_LT(keep_count, keep_count_for_smallest_known_to_not_fit);
DCHECK_GT(keep_count, keep_count_for_largest_known_to_fit);
- truncated_string = truncate_to_buffer(string, keep_count, string_buffer);
+ truncated_string = truncate_to_buffer(string, keep_count, base::span(string_buffer));
width = StringWidth(font, truncated_string);
if (width <= max_width) {
@@ -185,7 +185,7 @@ static String TruncateString(const Strin
if (keep_count != keep_count_for_largest_known_to_fit) {
keep_count = keep_count_for_largest_known_to_fit;
- truncated_string = truncate_to_buffer(string, keep_count, string_buffer);
+ truncated_string = truncate_to_buffer(string, keep_count, base::span(string_buffer));
}
return String(truncated_string);