From bb3d6313f278feee76f5fba17feff3aee65fb928 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 14 Jun 2018 18:56:08 +0000 Subject: Move definition of XFA_SCRIPTATTRIBUTEINFO into cjx_object.h. This allows compilers targeting the MS ABI to select the correct inheritance model for the member function pointer type XFA_ATTRIBUTE_CALLBACK using the complete type of CJX_Object. It will allow us to enable the new Clang flag -fcomplete-member-pointers globally. Bug: chromium:847724 Change-Id: I90cedde8c5355e5eb896a93f0e43e6a1e1d09dbc Reviewed-on: https://pdfium-review.googlesource.com/35190 Commit-Queue: Tom Sepez Reviewed-by: Tom Sepez --- fxjs/xfa/cjx_object.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'fxjs/xfa') diff --git a/fxjs/xfa/cjx_object.h b/fxjs/xfa/cjx_object.h index 1c5e40514e..44df6c4c5a 100644 --- a/fxjs/xfa/cjx_object.h +++ b/fxjs/xfa/cjx_object.h @@ -22,6 +22,7 @@ class CFXJSE_Value; class CFX_V8; +class CJX_Object; class CXFA_CalcData; class CXFA_Document; class CXFA_LayoutItem; @@ -285,4 +286,16 @@ class CJX_Object { size_t calc_recursion_count_ = 0; }; +typedef void (CJX_Object::*XFA_ATTRIBUTE_CALLBACK)(CFXJSE_Value* pValue, + bool bSetting, + XFA_Attribute eAttribute); + +struct XFA_SCRIPTATTRIBUTEINFO { + uint32_t uHash; + const wchar_t* pName; + XFA_ATTRIBUTE_CALLBACK callback; + XFA_Attribute attribute; + XFA_ScriptType eValueType; +}; + #endif // FXJS_XFA_CJX_OBJECT_H_ -- cgit v1.2.3