Age | Commit message (Collapse) | Author |
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2386263003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2382723003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2383543002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2379033002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2381863003
|
|
BUG=pdfium:597
Review-Url: https://codereview.chromium.org/2345063002
|
|
Also, it's idempotent, so simplify some logic in callers to
not care if objnum is zero.
The alternate forms are rarely used, using the objnum form
makes it clear that SetReferenceFor() can't possibly register
the object as a side-effect.
Review-Url: https://codereview.chromium.org/2361713002
|
|
Review-Url: https://codereview.chromium.org/2358243002
|
|
We remove the indirect object holder argument and check that
call sites pass ownable objects, adding a reference in one
place that always was passing an indirect object.
Also check that the invariant isn't violated, we need to fail
here in the wild and investigate -- these are existing UAFs.
Review-Url: https://codereview.chromium.org/2355083002
|
|
Remove CPDF_Creator and CPDF_Parser as friends of CPDF_Document. Move all
member variables to the private section, and add CPDF_TestDocument as a
private friend.
Review-Url: https://codereview.chromium.org/2349353003
|
|
This reverts commit 81e1e3fd2d33478733e47bd007b76fac1a663e74.
Review-Url: https://codereview.chromium.org/2353013003
|
|
This reverts commit c8544d634a1993e2592e41458be215fcd0956031.
TBR=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/2355683002 .
|
|
The objects it is given are owned by it and are simply
deleted without regard to Release() used by others.
Review-Url: https://codereview.chromium.org/2350263002
|
|
Replace the CPDF_Stream(nullptr, 0, nullptr) pattern with
a default ctor.
Remove unused parameters from CPDF_Stream::SetData(). Both
are always passed as FALSE.
CPDF_Stream declared its own m_GenNum, which shadowed the one
in CPDF_Object. It was used only to distinguish file/memory
streams, so add a bool explicitly for this purpose.
Remove the union, it would be sad if we confused user data
with a C++ object with virtual function calls.
Use unique_ptrs with appropriate deleters to manage memory.
Review-Url: https://codereview.chromium.org/2347993002
|
|
This Cl makes the Get and Set methods consistenly use {G|S}et<Type>For.
BUG=pdfium:596
Review-Url: https://codereview.chromium.org/2334323005
|
|
This CL moves the m_IndirectObjs map to be private to the IndirectObjectHolder.
Various bits of code have been updated to use the accessors to the map.
This CL fixes the issue with the last time this landed by removing the objnum
check from GetIndirectObject() which appears to have caused the crashes.
Review-Url: https://codereview.chromium.org/2275703002
|
|
This Cl updates the names of the methods in the indirect object holder to better
reflect their usage. The m_LastObjNum is made private and a setter added.
Review-Url: https://codereview.chromium.org/2275593002
|
|
https://codereview.chromium.org/2253723002/ )
Reason for revert:
Causing asan issues. See crbug.com/639451.
Original issue's description:
> Move parser pointer to CPDF_Document
>
> The CPDF_IndirectObjectHolder has two subclasses, CPDF_Document and
> CFDF_Document. The CPDF document requires the parser and the CFDF document
> does not. This cl moves the parser pointer up to CPDF_Document.
>
> Committed: https://pdfium.googlesource.com/pdfium/+/260f5fbf3553a96fa49b029cc050220039c30e2a
TBR=tsepez@chromium.org,thestig@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
Review-Url: https://codereview.chromium.org/2266033002
|
|
The CPDF_IndirectObjectHolder has two subclasses, CPDF_Document and
CFDF_Document. The CPDF document requires the parser and the CFDF document
does not. This cl moves the parser pointer up to CPDF_Document.
Review-Url: https://codereview.chromium.org/2253723002
|
|
BUG=pdfium:545
Review-Url: https://codereview.chromium.org/2194393002
|
|
And use it where appropriate.
Review-Url: https://codereview.chromium.org/2224623002
|
|
The definitions of CPDF_Dictionary::SetAtReference and
CPDF_Dictionary::AddReference are identical, and AddReference is only used
once. So remove CPDF_Dictionary::AddReference method and use
CPDF_Dictionary::SetAtReference instead.
Review-Url: https://codereview.chromium.org/2161453002
|
|
This change contains files in core/fpdfapi directory. This is part
of the efforts to make PDFium code compilable by Clang chromium
style plugins.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups;
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2060973002
|
|
Review-Url: https://codereview.chromium.org/2032613003
|
|
Review-Url: https://codereview.chromium.org/2044453003
|
|
CFX_PSRenderer, IFX_PSOutput, CPSOutput, CPSPrinterDriver.
Also reland commit 2d63eaa.
Review-Url: https://codereview.chromium.org/2019603002
|
|
When there are duplicate variable declarations, the inner names shadow the
outter ones. This is error prone and harder to read. Remove all the
instances found by /analyze.
BUG=chromium:613623, chromium:427616
Review-Url: https://codereview.chromium.org/2027273002
|
|
Review-Url: https://codereview.chromium.org/2001933002
|
|
The variable needs to be initialized before using.
Review-Url: https://codereview.chromium.org/1984323002
|
|
id:20001 of https://codereview.chromium.org/1988603002/ )
Reason for revert:
The variable is still needed, will fix the other way.
Original issue's description:
> Remove an unnecessary variable from CPDF_Creator
>
> The variable may not be initialized before using, which caused
> errors on DrMemory bot. Since it is not necessary, remove it.
>
> TBR=thestig@chromium.org
>
> Committed: https://pdfium.googlesource.com/pdfium/+/47b998b53edbb071bb55c909169be1070126fb22
TBR=dsinclair@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/1987783002
|
|
The variable may not be initialized before using, which caused
errors on DrMemory bot. Since it is not necessary, remove it.
TBR=thestig@chromium.org
Review-Url: https://codereview.chromium.org/1988603002
|
|
- Used unique_ptr and initializer list.
- Remove variables that never change in value.
Review-Url: https://codereview.chromium.org/1976003003
|
|
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and
assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can
be overridden if the platform requies and we can pickup the Chromium version
if it has already been defined in the build.
This does change behaviour. Currently FXSYS_assert is always defined but ASSERT
is only defined in debug builds. So, the FXSYS_assert's would fire in Release
builds. That will no longer happen.
BUG=pdfium:219
Review-Url: https://codereview.chromium.org/1914303003
|
|
Review URL: https://codereview.chromium.org/1925453002
|
|
This CL removes the interfaces:
* IPDF_ObjectRenderer
* IPDF_OCContext
* IPDF_RenderModule
* IPDF_PageModule
The CPDF_RenderModule was just wrapping new and delete calls. This Cl moves
those up to the callers and removes the CPDF_RenderModule class.
Review URL: https://codereview.chromium.org/1918323003
|
|
- Merge CPDF_Page::Load() into ctor.
- Remove always nullptr param for CPDF_Page::ParseContent().
- Remove unneeded indirection in IPDF_RenderModule.
- Delete CPDF_ParseOptions.
- Fix up CPDF_Pattern.
Review URL: https://codereview.chromium.org/1918113002
|
|
Review URL: https://codereview.chromium.org/1904303002
|
|
Review URL: https://codereview.chromium.org/1909213002
|
|
Replace two parallel arrays with an array of pairs.
Several methods always returned same value, make void instead.
Review URL: https://codereview.chromium.org/1908153002
|
|
This cleans up the Initialize methods and the ownership in CPDF_Creator.
Review URL: https://codereview.chromium.org/1902713003
|
|
This CL replaces the interfaces with the concrete classes. The concrete classes
are also renamed to remove the Standard from their names.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1898173002
|
|
Remove redundant CPDF_Name constructors given promotion rules.
Rework one char* in CPDF_PageContentGenerator.
Review URL: https://codereview.chromium.org/1890973006
|
|
These are exposed by making the ByteString from ByteStringC
ctor explicit, but we can clean them up independently.
Review URL: https://codereview.chromium.org/1884363002
|
|
This will help avoid duplicate allocation of CFX_ByteStrings
when the caller already has one. It may seem counter-intuitive
that requiring the caller to pass an allocated CFX_ByteString
rather than a static CFX_ByteStringC would improve the situation,
but due to the idiosyncrasies of std::map, the CPDF_Dictionary
methods must always do an allocation under the covers which
can't be avoided.
The changed callers in this CL are places where we would
previously demote to CFX_ByteStringC and then allocate a
a duplicate CFX_ByteString in the dictionary method.
Review URL: https://codereview.chromium.org/1889863002
|
|
Clean up three 4701 warnings (use potientially uninitialized variable)
which are the only ones left;
Re-enable warning 4701 for GN build;
Remove an unused data structure;
BUG=pdfium:29
Review URL: https://codereview.chromium.org/1885093002
|
|
Replace the usage of CFX_ArrayTemplate inside CPDF_Array, which
has non-standard APIs such as GetSize() returns int.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1867183002 .
|
|
BUG=
Review URL: https://codereview.chromium.org/1868293002
|
|
The naming is redundant given the base type, and will stand
in the way of consolidating Byte and Wide code.
BUG=
Review URL: https://codereview.chromium.org/1862123003
|
|
Having this happen implicitly can be dangerous because the lifetime
has to be considered; we should have caught the "red bots" in
https://codereview.chromium.org/1847333004/#ps60001 at compile time.
Review URL: https://codereview.chromium.org/1853233002
|
|
This makes pdfium code on Linux and Mac sign-compare warning free.
The warning flag will be re-enabled after checking on windows clang build.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1841643002 .
|