Skip to content

Commit

Permalink
chromium: [PATCH] pdfium: Fix missing function argument
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
adalessandro committed Jan 30, 2025
1 parent c0e2645 commit 9e5ee27
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions meta-chromium/recipes-browser/chromium/chromium-gn.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SRC_URI += "\
file://0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch \
file://0013-build-config-compiler-BUILD.gn-Disable-CREL.patch \
file://0014-Revert-Set-Rust-symbol-visibility-to-hidden-when-C-s.patch \
file://0015-pdfium-Fix-missing-PDFiumAPIStringBufferAdapter-temp.patch \
"
# ARM/AArch64-specific patches.
SRC_URI:append:aarch64 = "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '', ' file://arm/0001-Fix-AES-crypto-SIGILL-on-rpi4-64.patch', d)}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 20deec0782b78d1c8302764e852ff174f7a4f564 Mon Sep 17 00:00:00 2001
From: Ariel D'Alessandro <[email protected]>
Date: Fri, 15 Nov 2024 00:49:27 -0300
Subject: [PATCH] pdfium: Fix missing PDFiumAPIStringBufferAdapter template
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]>
---
pdf/pdfium/pdfium_api_wrappers.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pdf/pdfium/pdfium_api_wrappers.cc b/pdf/pdfium/pdfium_api_wrappers.cc
index b13fe20875e61..60c973b7152ab 100644
--- a/pdf/pdfium/pdfium_api_wrappers.cc
+++ b/pdf/pdfium/pdfium_api_wrappers.cc
@@ -147,7 +147,7 @@ std::u16string GetPageObjectMarkName(FPDF_PAGEOBJECTMARK mark) {

// Number of characters, including the NUL.
const size_t expected_size = base::checked_cast<size_t>(buflen_bytes / 2);
- PDFiumAPIStringBufferAdapter adapter(&name, expected_size,
+ PDFiumAPIStringBufferAdapter<std::u16string> adapter(&name, expected_size,
/*check_expected_size=*/true);
unsigned long actual_buflen_bytes = 0; // NOLINT(runtime/int)
bool result =

0 comments on commit 9e5ee27

Please sign in to comment.