summaryrefslogtreecommitdiff
path: root/xfa/fee
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-03 14:13:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-03 14:13:29 -0700
commit4d06f83da7fbc65e83ecc3c36b339c04ac1ab668 (patch)
tree183592694f9c93951838111130d78d204e1e9a68 /xfa/fee
parent89fcde88f0c03da77d7fd83dece7726d66fd190e (diff)
downloadpdfium-4d06f83da7fbc65e83ecc3c36b339c04ac1ab668.tar.xz
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
Diffstat (limited to 'xfa/fee')
-rw-r--r--xfa/fee/fde_txtedtbuf.cpp5
-rw-r--r--xfa/fee/fde_txtedtbuf.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fee/fde_txtedtbuf.cpp b/xfa/fee/fde_txtedtbuf.cpp
index 988ca4a5c1..1369d55be5 100644
--- a/xfa/fee/fde_txtedtbuf.cpp
+++ b/xfa/fee/fde_txtedtbuf.cpp
@@ -370,9 +370,8 @@ void CFDE_TxtEdtBuf::ResetChunkBuffer(int32_t nDefChunkCount,
m_nChunkSize = nChunkSize;
int32_t nChunkLength =
sizeof(FDE_CHUNKHEADER) + (m_nChunkSize - 1) * sizeof(FX_WCHAR);
- m_pAllocator =
- FX_CreateAllocator(FX_ALLOCTYPE_Fixed, nDefChunkCount, nChunkLength);
- ASSERT(m_pAllocator);
+ m_pAllocator = IFX_MemoryAllocator::Create(FX_ALLOCTYPE_Fixed, nDefChunkCount,
+ nChunkLength);
FDE_CHUNKHEADER* lpChunkHeader =
static_cast<FDE_CHUNKHEADER*>(m_pAllocator->Alloc(nChunkLength));
ASSERT(lpChunkHeader);
diff --git a/xfa/fee/fde_txtedtbuf.h b/xfa/fee/fde_txtedtbuf.h
index 5d7de45401..673d2b98ca 100644
--- a/xfa/fee/fde_txtedtbuf.h
+++ b/xfa/fee/fde_txtedtbuf.h
@@ -81,7 +81,7 @@ class CFDE_TxtEdtBuf {
int32_t m_nTotal;
FX_BOOL m_bChanged;
CFX_ArrayTemplate<FDE_CHUNKHEADER*> m_Chunks;
- IFX_MEMAllocator* m_pAllocator;
+ IFX_MemoryAllocator* m_pAllocator;
};
#endif // XFA_FEE_FDE_TXTEDTBUF_H_