Age | Commit message (Collapse) | Author |
|
Review-Url: https://codereview.chromium.org/2616623005
|
|
We worry about cyclical references, but no leaks found.
Review-Url: https://codereview.chromium.org/2609423003
|
|
Be suspicious of |new|. This removes some of the
easy cases.
Review-Url: https://codereview.chromium.org/2571913002
|
|
Review-Url: https://codereview.chromium.org/2567503002
|
|
Minimalist changes with the tidying of the code to
use better loop iterators as a follow-up.
Review-Url: https://codereview.chromium.org/2556963004
|
|
Also convernt one nearby array to vector as well.
Review-Url: https://codereview.chromium.org/2559903002
|
|
Avoid the |delete this| anti-pattern.
Remove some checks which don't avoid other segvs anyways.
Review-Url: https://codereview.chromium.org/2557173002
|
|
Review-Url: https://codereview.chromium.org/2562563002
|
|
The previous CLs made the code clean, so now we can mark more things
private, and add friends as appropriate.
Review-Url: https://codereview.chromium.org/2560783003
|
|
IFGAS_Streams are not part of the IFX_Stream hierarchy, but
can be made from such.
Review-Url: https://codereview.chromium.org/2559763002
|
|
We can remove a lot of "bOwnsStream" logic in the process.
Always pass these by const reference, in case the called method
wants to hang on to the stream (one exception is where we stick
a raw pointer into a void* slot in a context from another layer).
Review-Url: https://codereview.chromium.org/2451493002
|
|
It's a separate hierarchy unrelated to the IFX_*Stream classes.
Also rename CFX_Stream to CFGAS_Stream, and so forth.
Review-Url: https://codereview.chromium.org/2535723010
|
|
Group related IFX_ classes.
Move #defines to .cpp file that uses them.
Replace loose function with static method.
Review-Url: https://codereview.chromium.org/2548583004
|
|
Fix naming to say "Stream"
Review-Url: https://codereview.chromium.org/2543043002
|
|
Also remove a bool that is always false.
Review-Url: https://codereview.chromium.org/2539203002
|
|
Removed some unused method, named files properly, cleaned up a bit.
Review-Url: https://codereview.chromium.org/2524493002
|
|
The -build/include setting was masking out build/include_what_you_use. This CL
restores them, fixes any build errors, and adds NOLINT as needed. As well,
the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd.
lint cleanups
Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f
Reviewed-on: https://pdfium-review.googlesource.com/2030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2512213002
|
|
The lack of coverage of the fpdfppo APIs was noticed while
trying to diagnose another issue. Adding basic calls to
these APIs then kicked out an assert in XFA, where duplicate
global CFXA_TimeZoneProviders were not expected. These are
cheap to create except for the global C RTL tzset() call, so
keep track of that and make these on demand.
Review-Url: https://codereview.chromium.org/2488403004
|
|
IFGAS_FontMgr is an interface only for a class only defined on Windows,
plus a class only defined for non-Windows. I'm removing the interface,
renaming the class to have the same name in both cases, and cleaning up
a bit of unused methods.
Review-Url: https://codereview.chromium.org/2494883002
|
|
Review-Url: https://codereview.chromium.org/2467203003
|
|
Review-Url: https://codereview.chromium.org/2453983002
|
|
Review-Url: https://codereview.chromium.org/2450183003
|
|
Review-Url: https://codereview.chromium.org/2453163002
|
|
It's been troubling for some time that an IFX_FileStream might
actually be an in-memory buffer with no backing file.
Review-Url: https://codereview.chromium.org/2443723002
|
|
- Nit fixes.
- Remove unused methods.
- Replace FX_BOOL with bool.
Review-Url: https://codereview.chromium.org/2419433004
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2383593002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2377393002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2382723003
|
|
Review-Url: https://codereview.chromium.org/2362063003
|
|
In all cases, bool can be used instead without problems.
Review-Url: https://codereview.chromium.org/2368693002
|
|
This CL updates all of the includes to be correctly sorted. A PRESUBMIT warning
is added (from chromium) that will warn if the includes are in the wrong order on upload.
Review-Url: https://codereview.chromium.org/2337293002
|
|
Use CFX_DefStore to only replace CFX_FixedStore, but not
CFX_StaticStore, since CFX_StaticStore has different behaviors.
CFX_StaticStore doesn't require its users to explicitly call free(),
it frees all the allocated memory during destruction. Use
CFX_DefStore to replace CFX_StaticStore would cause leaks.
Also remove two undeclared, but defined, functions.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2328403002
|
|
Reland of Fix leaked internal font (patchset #2 id:60001 of
https://codereview.chromium.org/2297303004/ )
In CFGAS_FontMgrImp::LoadFont(), a new internal font is created which
is never released. It needs to be correctly marked as internal font to
be released. Fix this by adding a new method to take the ownership
of the font and mark it as internal font properly.
The previous revert was caused by memory management errors
which were fixed at https://codereview.chromium.org/2322043002/
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2320213002
|
|
A few issues are fixed:
--Change variable |m_bLogic| in CFX_Font to |m_bShallowCopy| to
reflect its meaning better;
--For a shallow copy of font, we must guarantee that the copied font
will not be deleted until the shallow copy is deleted. So need to
increase the src font's refcount when copying it;
--The stream |m_pOwnedStream| needs to have matched new/delete
These errors need to be fixed before we can properly delete all the
fonts to address the leaks.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2322043002
|
|
Two leak cases are addressed here:
--In CFGAS_FontMgrImp::LoadFont(), calling LoadFace() is unnecessary
since the following LoadFile() does the exact same thing. Calling
LoadFace() without releasing the loaded face results in a leak;
--|m_Hash2Fonts| in class CFGAS_FontMgrImp owns all the fonts stored
in it. The fonts need to be deleted along with the container.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2322483003
|
|
https://codereview.chromium.org/2297303004/ )
Reason for revert:
asan bot doesn't like it, will investigate
Original issue's description:
> Fix leaked internal font
>
> In CFGAS_FontMgrImp::LoadFont(), a new internal font is created which
> is never released. It needs to be correctly marked as internal font to
> be released. Fix this by adding a boolean parameter and pass it along
> during the creation of the font.
>
> BUG=pdfium:242
>
> Committed: https://pdfium.googlesource.com/pdfium/+/6708106e6a3d54f3370c871ebf6643d1ecf58999
TBR=thestig@chromium.org,dsinclair@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2302213002
|
|
In CFGAS_FontMgrImp::LoadFont(), a new internal font is created which
is never released. It needs to be correctly marked as internal font to
be released. Fix this by adding a boolean parameter and pass it along
during the creation of the font.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2297303004
|
|
Review-Url: https://codereview.chromium.org/2292503002
|
|
The GEFont points to the font manager which creates it and tries to unregister
itself. Currently the GEFont can be created by the default mapper and then
stored in a different mapper. If the default mapper is destroyed first, when
the second mapper cleans up the font there will be a call to unregister on
the default mapper causing a use-after-free.
The long term fix is to fixup the GEFont so it points to the correct mapper
to unregister from. This CL forces the destruction order in CXFA_FFApp to
cleanup the non-default mapper first.
BUG=chromium:637546
Review-Url: https://codereview.chromium.org/2259823004
|
|
Review-Url: https://codereview.chromium.org/2260533002
|
|
Return unique_ptr for GetLocale(), directly use destructors
instead of Release() functions, use vectors to manage arrays.
Review-Url: https://codereview.chromium.org/2241863002
|
|
The two methods in fgas_system also exist in core/fxcrt/include/fx_ext with the
FXSYS_ prefix instead of FX_. Remove the fgas_system files and use the
fx_ext versions instead.
Review-Url: https://codereview.chromium.org/2233133002
|
|
Use smart pointers instead of raw pointer to make memory management
easier for classes mainly under xfa/fxfa.
Also change the return type of IFGAS_FontMgr::Create() to smart
pointer type.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2227883002
|
|
files.
This is the third CL to separate fx_ge into classes, one per file.
All fx_ge.h includes had to be replaced with new includes
The method definitions for CFX_FxgeDevice were not moved to a single file.
These methods are defined in two folders different from fxge/ge, so they were left untouched for now.
Review-Url: https://codereview.chromium.org/2223213002
|
|
This is the first CL in an attempt to split up the classes in fxge/include/fx_ge.h into their own files.
Review-Url: https://codereview.chromium.org/2217663002
|
|
For classes under xfa/fgas, xfa/fwl/basewidget, and xfa/fwl/core,
use smart pointers instead of raw pointer to make memory management
easier.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2207093005
|
|
Use smart pointer to replace raw pointer type for class
owned member variables so that memory management will
be easier.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2208423002
|
|
Move CFX_FolderFontInfo, CFX_FontMgr, and CFX_FontMapper into their own
classes. There are namespaces in each of the new files, having methods
from the original namespace in fx_ge_fontmap, according to what each
class needs.
Review-Url: https://codereview.chromium.org/2185533006
|
|
For the class owned member variables, use std::unique_ptr or
std::vector for memory management.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2169793002
|