Skip to content

Commit 6b11d8d

Browse files
committed
chromium: [PATCH] pdfium: Fix missing function argument
Fix the following compilation error: ``` | ../../pdf/pdfium/pdfium_api_wrappers.cc:150:32: error: alias template 'PDFiumAPIStringBufferAdapter' requires template arguments; argument deduction only allowed for class templates | 150 | PDFiumAPIStringBufferAdapter adapter(&name, expected_size, | | ^ | ../../pdf/pdfium/pdfium_api_string_buffer_adapter.h:173:1: note: template is declared here | 173 | using PDFiumAPIStringBufferAdapter = | | ^ | 1 error generated. ``` Signed-off-by: Ariel D'Alessandro <[email protected]>
1 parent 7204798 commit 6b11d8d

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SRC_URI += "\
2828
file://0011-Disable-crabbyavif-to-fix-build-errors.patch \
2929
file://0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch \
3030
file://0013-Revert-Set-Rust-symbol-visibility-to-hidden-when-C-s.patch \
31+
file://0014-pdfium-Fix-missing-PDFiumAPIStringBufferAdapter-temp.patch \
3132
"
3233
# ARM/AArch64-specific patches.
3334
SRC_URI:append:aarch64 = "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '', ' file://arm/0001-Fix-AES-crypto-SIGILL-on-rpi4-64.patch', d)}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 20deec0782b78d1c8302764e852ff174f7a4f564 Mon Sep 17 00:00:00 2001
2+
From: Ariel D'Alessandro <[email protected]>
3+
Date: Fri, 15 Nov 2024 00:49:27 -0300
4+
Subject: [PATCH] pdfium: Fix missing PDFiumAPIStringBufferAdapter template
5+
argument
6+
7+
Fix the following compilation error:
8+
9+
```
10+
| ../../pdf/pdfium/pdfium_api_wrappers.cc:150:32: error: alias template
11+
'PDFiumAPIStringBufferAdapter' requires template arguments; argument
12+
deduction only allowed for class templates
13+
| 150 | PDFiumAPIStringBufferAdapter adapter(&name, expected_size,
14+
| | ^
15+
| ../../pdf/pdfium/pdfium_api_string_buffer_adapter.h:173:1: note: template
16+
is declared here
17+
| 173 | using PDFiumAPIStringBufferAdapter =
18+
| | ^
19+
| 1 error generated.
20+
```
21+
22+
Upstream-Status: Inappropriate [specific to older versions of clang]
23+
Signed-off-by: Ariel D'Alessandro <[email protected]>
24+
---
25+
pdf/pdfium/pdfium_api_wrappers.cc | 2 +-
26+
1 file changed, 1 insertion(+), 1 deletion(-)
27+
28+
diff --git a/pdf/pdfium/pdfium_api_wrappers.cc b/pdf/pdfium/pdfium_api_wrappers.cc
29+
index b13fe20875e61..60c973b7152ab 100644
30+
--- a/pdf/pdfium/pdfium_api_wrappers.cc
31+
+++ b/pdf/pdfium/pdfium_api_wrappers.cc
32+
@@ -147,7 +147,7 @@ std::u16string GetPageObjectMarkName(FPDF_PAGEOBJECTMARK mark) {
33+
34+
// Number of characters, including the NUL.
35+
const size_t expected_size = base::checked_cast<size_t>(buflen_bytes / 2);
36+
- PDFiumAPIStringBufferAdapter adapter(&name, expected_size,
37+
+ PDFiumAPIStringBufferAdapter<std::u16string> adapter(&name, expected_size,
38+
/*check_expected_size=*/true);
39+
unsigned long actual_buflen_bytes = 0; // NOLINT(runtime/int)
40+
bool result =

0 commit comments

Comments
 (0)