From 4f6fdbe6adf0d90886b9deb5666996603cf1207c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 9 Mar 2016 13:24:25 -0800 Subject: Structs shouldn't inherit from CFX_Target. There are some assumptions in the code that CAPS_NAMED structs are POD, and can be memcpy'd, malloc'd, etc. CFX_Target adds a virtual dtor, which is not what is desired for many of these, so resolve by making each a CAPS_Named class or by removing the inheritence. In the process XFA_TextPiece was found to be malloc'd despite having a ctor. Move this to |new|, noting that the object is never freed (and goes out of existence when the allocator's pool is destroyed). BUG=pdfium:432 R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1780753002 . --- xfa/src/fde/fde_iterator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xfa/src/fde/fde_iterator.h') diff --git a/xfa/src/fde/fde_iterator.h b/xfa/src/fde/fde_iterator.h index eadff97508..2bb4c1a19f 100644 --- a/xfa/src/fde/fde_iterator.h +++ b/xfa/src/fde/fde_iterator.h @@ -10,7 +10,7 @@ #include "xfa/src/fde/fde_visualset.h" #include "xfa/src/fgas/crt/fgas_memory.h" -struct FDE_CANVASITEM : public CFX_Target { +struct FDE_CANVASITEM { IFDE_CanvasSet* pCanvas; FDE_HVISUALOBJ hCanvas; FX_POSITION hPos; -- cgit v1.2.3