diff options
author | Lei Zhang <thestig@chromium.org> | 2015-11-09 14:51:57 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-11-09 14:51:57 -0800 |
commit | 956168fc8abf4046e94eef9ee76b0705a6248ac0 (patch) | |
tree | 967273d93f252c7db794ad3484e02d40e8b2e843 /core/include | |
parent | b155293cd514587c4c392d3ffebe2dfb5a765bd3 (diff) | |
download | pdfium-956168fc8abf4046e94eef9ee76b0705a6248ac0.tar.xz |
Merge to XFA: Fix a leak in CPDF_Type3Font::LoadChar().
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1408063016 .
(cherry picked from commit 6d9979dc685e3b67b0a6d9946376e026d75d3e47)
Review URL: https://codereview.chromium.org/1418503020 .
Diffstat (limited to 'core/include')
-rw-r--r-- | core/include/fpdfapi/fpdf_resource.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h index dee15cf941..233f07c57a 100644 --- a/core/include/fpdfapi/fpdf_resource.h +++ b/core/include/fpdfapi/fpdf_resource.h @@ -7,6 +7,8 @@ #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ +#include <map> + #include "../fxcrt/fx_system.h" #include "../fxge/fx_font.h" #include "fpdf_parser.h" @@ -360,28 +362,23 @@ class CPDF_TrueTypeFont : public CPDF_SimpleFont { virtual FX_BOOL _Load(); virtual void LoadGlyphMap(); }; + class CPDF_Type3Char { public: - CPDF_Type3Char(); - + // Takes ownership of |pForm|. + explicit CPDF_Type3Char(CPDF_Form* pForm); ~CPDF_Type3Char(); FX_BOOL LoadBitmap(CPDF_RenderContext* pContext); - FX_BOOL m_bColored; - - FX_BOOL m_bPageRequired; - CPDF_Form* m_pForm; - - CFX_AffineMatrix m_ImageMatrix; - CFX_DIBitmap* m_pBitmap; - + FX_BOOL m_bColored; int m_Width; - + CFX_AffineMatrix m_ImageMatrix; FX_RECT m_BBox; }; + class CPDF_Type3Font : public CPDF_SimpleFont { public: CPDF_Type3Font(); @@ -410,8 +407,7 @@ class CPDF_Type3Font : public CPDF_SimpleFont { CPDF_Dictionary* m_pCharProcs; CPDF_Dictionary* m_pPageResources; CPDF_Dictionary* m_pFontResources; - CFX_MapPtrToPtr m_CacheMap; - CFX_MapPtrToPtr m_DeletedMap; + std::map<FX_DWORD, CPDF_Type3Char*> m_CacheMap; }; enum CIDSet { |