Skip to content

Commit 2ce553b

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 9932b52 commit 2ce553b

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SRC_URI += "\
2828
file://0011-Revert-Allow-and-use-std-hardware_destructive_interf.patch \
2929
file://0012-build-config-compiler-BUILD.gn-Disable-CREL.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,42 @@
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+
Signed-off-by: Ariel D'Alessandro <[email protected]>
23+
---
24+
pdf/pdfium/pdfium_api_wrappers.cc | 2 +-
25+
1 file changed, 1 insertion(+), 1 deletion(-)
26+
27+
diff --git a/pdf/pdfium/pdfium_api_wrappers.cc b/pdf/pdfium/pdfium_api_wrappers.cc
28+
index b13fe20875e61..60c973b7152ab 100644
29+
--- a/pdf/pdfium/pdfium_api_wrappers.cc
30+
+++ b/pdf/pdfium/pdfium_api_wrappers.cc
31+
@@ -147,7 +147,7 @@ std::u16string GetPageObjectMarkName(FPDF_PAGEOBJECTMARK mark) {
32+
33+
// Number of characters, including the NUL.
34+
const size_t expected_size = base::checked_cast<size_t>(buflen_bytes / 2);
35+
- PDFiumAPIStringBufferAdapter adapter(&name, expected_size,
36+
+ PDFiumAPIStringBufferAdapter<std::u16string> adapter(&name, expected_size,
37+
/*check_expected_size=*/true);
38+
unsigned long actual_buflen_bytes = 0; // NOLINT(runtime/int)
39+
bool result =
40+
--
41+
2.45.2
42+

0 commit comments

Comments
 (0)