From 4d06f83da7fbc65e83ecc3c36b339c04ac1ab668 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 3 May 2016 14:13:29 -0700 Subject: Cleanup XFA-Specific memory allocators. Remove unused "dynamic" allocator (the scary one). Use malloc/free wrapper allocator under #ifdef for CF/asan testing. Rename IFX_MEMAllocator to IFX_MemoryAllocator (MEM in all caps would imply that MEM was an acroynm, not an abbreviation). Review-Url: https://codereview.chromium.org/1944093002 --- xfa/fxfa/app/xfa_textlayout.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'xfa/fxfa/app/xfa_textlayout.h') diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h index bc6719a4df..17450ddeab 100644 --- a/xfa/fxfa/app/xfa_textlayout.h +++ b/xfa/fxfa/app/xfa_textlayout.h @@ -130,7 +130,7 @@ class CXFA_TextParser { void ParseTagInfo(CFDE_XMLNode* pXMLNode, CXFA_CSSTagProvider& tagProvider); IFDE_CSSStyleSheet* LoadDefaultSheetStyle(); IFDE_CSSComputedStyle* CreateStyle(IFDE_CSSComputedStyle* pParentStyle); - IFX_MEMAllocator* m_pAllocator; + IFX_MemoryAllocator* m_pAllocator; CFDE_CSSStyleSelector* m_pSelector; IFDE_CSSStyleSheet* m_pUASheet; CFX_MapPtrTemplate @@ -169,7 +169,7 @@ class CXFA_LoaderContext { class CXFA_LinkUserData : public IFX_Unknown, public CFX_Target { public: - CXFA_LinkUserData(IFX_MEMAllocator* pAllocator, FX_WCHAR* pszText) + CXFA_LinkUserData(IFX_MemoryAllocator* pAllocator, FX_WCHAR* pszText) : m_pAllocator(pAllocator), m_dwRefCount(1) { m_pszURLContent = pszText; } @@ -186,14 +186,15 @@ class CXFA_LinkUserData : public IFX_Unknown, public CFX_Target { const FX_WCHAR* GetLinkURL() { return m_pszURLContent.c_str(); } protected: - IFX_MEMAllocator* m_pAllocator; + IFX_MemoryAllocator* m_pAllocator; uint32_t m_dwRefCount; CFX_WideString m_pszURLContent; }; class CXFA_TextUserData : public IFX_Unknown, public CFX_Target { public: - CXFA_TextUserData(IFX_MEMAllocator* pAllocator, IFDE_CSSComputedStyle* pStyle) + CXFA_TextUserData(IFX_MemoryAllocator* pAllocator, + IFDE_CSSComputedStyle* pStyle) : m_pStyle(pStyle), m_pLinkData(nullptr), m_pAllocator(pAllocator), @@ -202,7 +203,7 @@ class CXFA_TextUserData : public IFX_Unknown, public CFX_Target { if (m_pStyle) m_pStyle->AddRef(); } - CXFA_TextUserData(IFX_MEMAllocator* pAllocator, + CXFA_TextUserData(IFX_MemoryAllocator* pAllocator, IFDE_CSSComputedStyle* pStyle, CXFA_LinkUserData* pLinkData) : m_pStyle(pStyle), @@ -232,7 +233,7 @@ class CXFA_TextUserData : public IFX_Unknown, public CFX_Target { CXFA_LinkUserData* m_pLinkData; protected: - IFX_MEMAllocator* m_pAllocator; + IFX_MemoryAllocator* m_pAllocator; uint32_t m_dwRefCount; }; @@ -404,7 +405,7 @@ class CXFA_TextLayout { CXFA_TextProvider* m_pTextProvider; CXFA_Node* m_pTextDataNode; FX_BOOL m_bRichText; - IFX_MEMAllocator* m_pAllocator; + IFX_MemoryAllocator* m_pAllocator; CFX_RTFBreak* m_pBreak; CXFA_LoaderContext* m_pLoader; int32_t m_iLines; -- cgit v1.2.3