Declare the pdf_enable_rust_bmp build argument, its override
pdf_enable_rust_bmp_override, and define the PDF_ENABLE_RUST_BMP
preprocessor macro when pdf_use_skia && pdf_enable_rust_bmp is active.
This allows external build recipes to configure the GN argument prior to
activating the Rust-based BMP decoder in a follow-up change.
TAG=agy
CONV=f457c92a-036e-44c5-89eb-1caaf0d672f5
Bug: 537855738
Change-Id: Ia44c2b798b5c26cac89a8025b83d8244e1978655
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/152810
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
This rule got added in 2020 when Chromium's //build still had
-Wno-c++11-narrowing by default. After that, crrev.com/896310 removed
-Wno-c++11-narrowing from Chromium's build rules. As such,
-Wc++11-narrowing is on by default, so there is no need to explicitly
specify it anymore. Similarly, remove -Wnarrowing for non-Clang
compilers.
Change-Id: I5070bdfa5d2e70b3fcb9244c21586f3b60e7db9a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/151471
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Add deduction guides for ScopedSetInsertion, ZipView2 and ZipView3 to
explicitly opt into supporting use of CTAD and fix the build errors
generated by this extra warning.
Change-Id: Ia6ecb42d871a9c0163764c77a5a087e1e77c4083
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/151430
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Enable the -Wlifetime-safety-permissive compiler flag to enforce
lifetime safety checks.
Fix a lifetime issue in CPDF_DIB::GetScanline where a pointer to a
local temporary buffer could be returned when the stream is truncated.
The temporary buffer is replaced with a class member buffer.
The code path returning the temporary buffer is believed to be
dynamically unreachable. It requires a JPX image with less than 3
channels to trigger a width mismatch, but such images are forced to
the DeviceGray color space, which routes differently.
TAG=agy
CONV=35e67fbe-02d2-429f-9dbd-5e7fa8e5e9b6
Fixed: 526724013
Change-Id: I660ef01bdc7bc98a60eb0c1fb884062a824f943e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/150450
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
This CL adds test based on brotli-stream compressed PDF files and
updates the needed BUILD files to be able to allow for Brotli
compression to be tested when the feature is built. These test files are
based on existing files with a compressed stream using brotli and
ASCII85 decode to prevent the stream from just being a binary blob.
Bug: 475855993
Change-Id: I8162dd98885cf6e75bfe8b5d82f61d7d4252bea1
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/148230
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Currently, no builds should set this, but allow development to
continue making these checks.
Change-Id: Iba0b507393ca5a0a2ec6f90aedd82adfb8ecb182
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/148192
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Allow building a theoretically skia-only platform without AGG fallback.
Fixed: 485984630
Change-Id: I1a85e5e6ea8a3e4bf395e10d7e16e06dc35cc8c4
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/143670
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Skia needs a DiscardableMemoryAllocator and pdfium_embeddertests built
in Chromium checkouts do not have one. Refactor pdfium_test's
DiscardableMemoryAllocator support code from CL [1] to support
pdfium_embeddertests as well.
[1] https://pdfium-review.googlesource.com/103474
Change-Id: I21ea4adf4312cb451a0b629cae3f78cde0c73d9e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/143270
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Relocate MaxPixelPerChannelDelta() and its helpers from image_diff.cpp
to a new utility file. Then, update the parameters so that callers do
not need to know about the UnpackedPixel struct.
This method will be reused in
https://pdfium-review.googlesource.com/c/pdfium/+/141472.
Bug: 468228360
Change-Id: I8f37a68527efc15f712c68286e864cf1a25be536
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/141471
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Andy Phan <andyphan@chromium.org>
This fixes then new "no_partition_alloc" bots, which are doing debug
builds when they hit a UNOWNED_PTR_EXCLUSION error. Previous attempts to
fix the no-PA build were release builds, so the error did not occur.
Bug: 469000730
Change-Id: Ie4e52fc2b969d3f0a196805211f8c54c7030645b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/139991
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
https://pdfium-review.googlesource.com/c/pdfium/+/136570 has landed an
implementation of `EncodeBGRAPNG` that ignores `discard_transparency`.
This behavior was different from the old, `libpng`-based implementation
as shown by the new `EncodeBGRAPNGAndDiscardTransparency` test where
the last assertion (`EXPECT_EQ(rgba_output[3], 255)`) would pass with
`libpng`-based implementation but (before this CL) fail with the
Rust-based implementation.
Bug: 444045690
Change-Id: Ifa894e36ab0f568aeea8a4421bc8ed9010f23d6b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/138891
Auto-Submit: Łukasz Anforowicz <lukasza@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
After this CL, if `pdf_enable_rust_png` GN arg is set, then PDFium tests
will use Rust-based PNG codec (instead of `libpng`-based one) from
`pdfium/testing/helpers/write.cc` and from
`testing/image_diff/image_diff_png...`.
Switching the production code underneath `core/fxcodec/png/...` is
deferred to a future CL (see
https://pdfium-review.googlesource.com/135730).
CLs that demonstrate test coverage of PDFium CQ:
- https://pdfium-review.googlesource.com/136111 - is an ad-hoc,
non-landable CL, which replaces `SkPngEncoder` usage in `write.cc`with
`NOTREACHED` to discover which tests cover it. All tests pass in this
CL (i.e. this path is not covered by CQ).
- https://pdfium-review.googlesource.com/136392 is a similar CL for
encoding/decoding path under `testing/image_diff/...` (there are a few
failing tests)
- https://pdfium-review.googlesource.com/136110 is a similar CL for
decoding path under `core/fxcodec/png/...` (there are a few failing
tests)
Bug: 444045690
Change-Id: Ica54e6e82d5646267242fd0a6d6538389bd18deb
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/135630
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@google.com>
Simplify our build files in the absence of MSVC support.
Bug: 389951208
Change-Id: I0290301a2adb09fa0bc7354f124f064477848db4
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/128350
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
This symbol is defined consistently in build/config/clang/BUILD.gn
and is a better source of truth than the old PDFium symbol.
This allows the UNSAFE_BUFFERS macro to be correctly defined even
outside of pdfium_common_config, such as for fuzzers and testing.
Change-Id: I5f15147e8eeb28104323b5a58f09707a8df6de7e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/127730
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
It should already be included via -Wextra.
Bug: 42050286
Change-Id: I21c0448e1d665e818bb1d8318cb09ea8a9810a83
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/123690
Reviewed-by: Tom Sepez <tsepez@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Import the Fontations build rules from Chromium's //skia/BUILD.gn into
PDFium's. The build rules are gated behind the `pdf_enable_fontations`
GN arg, similar to how Fontations was first introduced into Chromium.
Bug: 42271123
Change-Id: Ifd632dd928ace32883c27f17d2826e1007dfd3ec
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/121353
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Take a step towards building Fontations by building some of its Rust
dependencies.
- Check out third_party/rust to make those dependencies available.
- Rename some rust variables in DEPS to make them clearer.
Bug: 42271123
Change-Id: Ia34dc4a720a04bd12abd6e0f9c523d8ebf909c7b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/121250
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
To move raw-ptr check from find-bad-construct plugin to raw-ptr plugin,
replace -plugin-arg-find-bad-constructs with -plugin-arg-raw-ptr-plugin.
Bug: 40945579
Change-Id: If7803c47616afb508f7ef08d4d332194ed05b112
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/120910
Reviewed-by: Thomas Sepez <tsepez@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Thomas Sepez <tsepez@google.com>
Allow future use of non-public APIs in the test programs. Also,
this has become far too complex to serve as a useful sample.
Fixed: pdfium:1895
Change-Id: I8ff3113a4aebbaf24d1cbcc46746c37436f46dbb
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/118911
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Define a symbol indicating it is present, and then use it to
condition plugin-specific definitions so as to avoid breaking
(future) builds against off-the-shelf clang compilers, as
plugin-only #pragma syntax may be added.
Change-Id: Ia485f9ed56705f2bf9506c9ba868b6b4515aca52
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/118273
Reviewed-by: Thomas Sepez <tsepez@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Clang's inability to optimize out some redundant CHECK()s was noticed
while working on an unrelated CL. This is caused by the issue noted in
crbug.com/40836910, where __attribute__((annotate()) changed code gen
as a side effect of placating warnings in the plugin.
Bug: chromium:40836910
Change-Id: Idde4cecd3c329c4c7bac728d5c376a4574cd8f77
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117550
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Thomas Sepez <tsepez@google.com>
Prepare for using the clang plugin-based filtering mechanism for
unsafe buffer warnings. This is enabled automatically as appropriate in
build/config/clang/BUILD.gn (sync'ed from outside of pdfium repository
along with other tools). It is enabled on a directory-by-directory basis
based on some paths.txt file (location to be specified via a GN variable
following a build/ roll past https://crrev.com/c/5369835.
Change-Id: I030dc5d15b2b9ea0541af146bcce5d61df13ffee
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117510
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Move helpers used for testing to the testing directory. Also shorten the
pdfium::base nested namespace to namespace pdfium.
Bug: pdfium:2127
Change-Id: If26a9054b75178b1781d1c5a5572fb69125fcc05
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116672
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Move the build definition for PDF_USE_SKIA into the public
configuration. This is necessary to enable embedders to use the
public APIs which are controlled by it, such as FPDF_FFLDrawSkia()
and FPDF_RenderPageSkia().
Bug: pdfium:11
Change-Id: Ibf35432691fccecd8b4737e1a4737dd0fa9ae4ad
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/115870
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Set up a pdf_enable_fontations GN flag for future use.
- Define PDF_ENABLE_FONTATIONS for use in C++ code when enabled.
- Add the override hook, so PDFium embedders that use GN can choose the
default via the override mechanism.
- Add GN assertion to make sure Rust and Skia are enabled.
Bug: pdfium:2107
Change-Id: I9ed504ebd5cbeaf922fe1da280cd20a08c260803
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/114834
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Be consistent with other defines in the code base. Avoid using a leading
underscore, as that is considered reserved by C/C++.
Bug: pdfium:11
Change-Id: I2e75b70236944f5c09cad3c9a1f6ed13761d8189
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/114833
Auto-Submit: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nigi <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
The plugin now has a check to prohibit stl collections of gced types and
members. PDFium intentionally uses such collections and thus can't use
the new check.
This CL adds a flag to BUILD.gn to explicitly disable this check such
that it will not be used in pdfium even when it is enabled by default.
Bug: chromium:1470687
Change-Id: I009068eca560bee4d7d937532f52bb94f0e9b9b1
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/114810
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
This will make any bots that enable Rust also actually verify that
building Rust targets is working.
Bug: chromium:1494118
Change-Id: Ic939c8a5d86d10410a3c7b4e268026736a5c0c39
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113390
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
To enable Rust build targets in standalone pdfium:
- Add `checkout_rust: True` to the gclient `custom_vars` section. As
it defaults to false:
"custom_vars": {
"checkout_rust": True,
}
- Set `enable_rust = true` in GN args, as it also defaults to false.
- Run gclient sync
Then building `rust_build_tests` will build test targets in
//build/rust/tests, which rely on and verify the functioning of
the Rust toolchain.
Make new rust targets by using the GN templates in //build/rust.
In the chromium build, Rust build targets that use the templates
from //build/rust will just work.
When rolling `tools/clang` and `build`, also roll `tools/rust` and
`testing/scripts/rust`.
Bug: chromium:1494118
Change-Id: I25fadcdee6223293382e623101b8489b75419791
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113230
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
This resolve two breaking change created by:
- 2023-09-28 bartekn Zero raw_ptr when constructing or moving
- 2023-10-03 arthursonzogni Move partition_alloc into a "partition_alloc" dir.
Note: We are still using the full pathname for partition_alloc files. In
a follow-up, after PartitionAlloc declare its include_dir, we will
shorten them.
Bug:chromium:1467773
Change-Id: Ib589e7a3e2b32c44d48a25701f4c467303ceb813
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/112210
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
To make the partition_alloc directory a standalone library, I am going to:
1. Move from files from:
/base/allocator/partition_allocator/*
toward
/base/allocator/partition_allocator/src/partition_alloc/*
2. Make PartitionAlloc to declare its include_dirs.
3. PartitionAlloc dependants will be able put PartitionAlloc wherever
they want (e.g. probably in their third_party/partition_alloc) and
to use:
#include "partition_alloc/..."
instead of:
#include "base/allocator/partition_allocator/src/partition_alloc/..."
Unfortunately, the partition_alloc library is already used by PDFium.
Step (1) would break it. To achieve step 1 without breaking pdfium, this
patch adds an option for chromium to set the location of PartitionAlloc.
This is temporary and will be removed after step 1 is completed in
Chrome.
It a kind of 3-step change.
Bug:chromuium:1467773
Change-Id: I9f312f6a47976659a1e792c663006f3a75ec7fca
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/111490
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
This removes the overhead of having to track this third_party directory.
It only contains two functions borrowed from Skia internals, which are
solely authored by Google. As such, the open source licensing team
approved the transfer of this code from Skia to PDFium.
Move the code into cpdf_contentstream_write_utils.cpp. The comments have
been updated to consistently use double slashes for comments, and the
code has been auto-formatted. Otherwise it remains the same.
Bug: b/293292512
Change-Id: I7998c046a21ef16de896f65de2d838ff5998ad3e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/110710
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Only defines the //testing/tools:test_runner_py target when
pdf_is_standalone, as this target is only useful and valid for the
PDFium CQ and CI builders.
Bug: pdfium:1933
Change-Id: I57d242086c0ed8b4d81f7c94feb753ca2a67106f
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/110590
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Auto-Submit: K. Moon <kmoon@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
This expands the use of BRP for testing in both pdfium_embeddertests
and pdfium_test. Currently, these are running with a malloc shim,
when supported, but not with the full BRP tracing enabled at runtime.
Change-Id: I5d7f8b4df0e66f6f8a860eec1286a2cb27adcc4f
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/110394
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
The tests currently indicate PA/BRP support, but only pdfium_unittests
is using the shim in this first iteration. Follow-on CLs will broaden
this to other pdfium binaries. Windows is still not yet enabled.
Bug: pdfium:2038
Change-Id: I67b4695b8e6cb1b820a18c58640b177436124739
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/110130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Build fewer tests when !pdf_is_standalone, but allow the pdfium_all
target (which is always reachable) to build more tests.
-- re-work some rooted pathnames.
Change-Id: Iaf3b23796720e1e419e0b30a6d68524c9ec32f41
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/110094
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Adds a GN action that writes out the runtime dependencies for
test_runner.py tests (javascript, pixel, and corpus) in a format
compatible with the "cas archive" tool. This will be used to support
swarming.
Bug: pdfium:1933
Change-Id: Id44a8ba3d5d607a88e304469eb79de2e0d683891
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/109272
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Reduce the scope of the files over which the plugin is run to
avoid false positives and save some cycles. Do not enable on
Windows yet to make incremental progress.
Change-Id: Idf65aa9c4015bb2f30b70043ac47f402aad72714
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107370
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Remove GN arg which was conflicting.
Change-Id: I5e4851eeb8696818c63772905dd95ce1641a5374
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107270
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Add another pattern to match a type of test.
Change-Id: Ic2f0963601abcb0785a95def1adeb761c27b8898
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107138
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Provide regular expressions for paths from which warnings should
be suppressed.
Change-Id: Iaba2c2ea01921431aad3d841c3482c1832b810de
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107137
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
The chromium clang plugin has an option to warn about places where T*
should be re-written to raw_ptr<T>. PDFium, can't enable this warning
directly because it uses UnownedPtr instead of raw_ptr<> since it needs
to support non-PartitionAlloc builds. Someday UnownedPtr will wrap
raw_ptr for PartitionAlloc builds, at which point it will be helpful to
have this warning. So create a pdf_enable_unowned_ptr_exclusion GN arg
to turn this on independently of chromium builds. Then mark the most
obvious places with UNOWNED_PTR_EXCLUSION.
This does not yet compile correctly with the option enabled:
-- Many places ought be converted to UnownedPtr<>.
-- Public headers shouldn't be polluted with this annotation.
-- Tests are unlikely to be converted.
Change-Id: Iec2dc30835b054063c3f32679252889dce4971df
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107131
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
When building PDFium with Clang, enable -Wcovered-switch-default.
Fix remaining warnings and remove an unnecessary variable initialization
along the way.
Bug: chromium:1393075
Change-Id: Ia7a439f2ca787f9e3dafb8d30fed2a38b7e29719
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/106670
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nigi <nigi@chromium.org>
This reverts commit 9140e3ff776b35ec92ae447148a2dcb739dec804.
Reason for revert: compilation warnings enable-checks-for-pdfium-directory
Original change's description:
> Enable cppgc plugin for pdfium
>
> Activate the plugin via compiler args now that the underlying issues
> have been resolved.
>
> Fixed: chromium:1421576
> Change-Id: Iafa3c8ec5b4c6f1ca8314c87bed1434269f691a5
> Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104730
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org,pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I8fd5db1b18b4fc886a04d63492c07e8b32971b96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104830
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Activate the plugin via compiler args now that the underlying issues
have been resolved.
Fixed: chromium:1421576
Change-Id: Iafa3c8ec5b4c6f1ca8314c87bed1434269f691a5
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104730
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
I'm getting rid of //:gn_visibility in Chrome (and other
relevant places) because it wasn't really needed and didn't
do what I'd hoped it would do.
This CL removes the reference to that target from //BUILD.gn
Bug: chromium:1311306
Change-Id: I48b4ef72a3385ad3dc44f305f0a215af4e9541d0
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104110
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>