summaryrefslogtreecommitdiff
path: root/xfa/src/fgas/include/fx_utl.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-30 11:20:00 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-30 11:20:00 -0700
commit83fa467a867c879f75447d99bc99f5f8831026f2 (patch)
tree1da26510f3e805f06862f27d8b4f6bb8ad03ad42 /xfa/src/fgas/include/fx_utl.h
parent6fc7919796b68d5264030250875dce2358605af1 (diff)
downloadpdfium-83fa467a867c879f75447d99bc99f5f8831026f2.tar.xz
Fix segv in CFX_BaseArray::~CFX_BaseArray
One can't blatantly memset() a class to zero if its parent contains a vtable. Fix some IWYU along the way. Kill some casts along the way. BUG=pdfium:259 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1416943007 .
Diffstat (limited to 'xfa/src/fgas/include/fx_utl.h')
-rw-r--r--xfa/src/fgas/include/fx_utl.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/xfa/src/fgas/include/fx_utl.h b/xfa/src/fgas/include/fx_utl.h
index 86a516b530..e4fcf78aba 100644
--- a/xfa/src/fgas/include/fx_utl.h
+++ b/xfa/src/fgas/include/fx_utl.h
@@ -6,6 +6,10 @@
#ifndef _FX_UTILS
#define _FX_UTILS
+
+#include "fx_mem.h"
+#include "../../../../core/include/fxcrt/fx_coordinates.h" // For CFX_Rect.
+
class CFX_ThreadLock;
class CFX_BaseArray;
template <class baseType>
@@ -30,6 +34,8 @@ template <class baseType>
class CFX_CPLTreeNode;
template <class baseType>
class CFX_CPLTree;
+class FX_BASEARRAYDATA;
+
class CFX_ThreadLock {
public:
CFX_ThreadLock();
@@ -43,7 +49,6 @@ class CFX_ThreadLock {
class CFX_BaseArray : public CFX_Target {
protected:
CFX_BaseArray(int32_t iGrowSize, int32_t iBlockSize);
- ~CFX_BaseArray();
int32_t GetSize() const;
int32_t GetBlockSize() const;
uint8_t* AddSpaceTo(int32_t index);
@@ -57,7 +62,8 @@ class CFX_BaseArray : public CFX_Target {
int32_t iCount = -1);
int32_t RemoveLast(int32_t iCount = -1);
void RemoveAll(FX_BOOL bLeaveMemory = FALSE);
- void* m_pData;
+
+ FX_BASEARRAYDATA* m_pData;
};
template <class baseType>
class CFX_BaseArrayTemplate : public CFX_BaseArray {