diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-06 14:53:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-06 14:53:21 +0000 |
commit | b1a3044cdcd99ab4c88927e8b840c0c712ae54e3 (patch) | |
tree | 35f078152238913cb667218b0adff72467a56d47 /fxjs/cjx_node.h | |
parent | e7ccf36f0498b69850a1ab7774b981e63cc8009d (diff) | |
download | pdfium-b1a3044cdcd99ab4c88927e8b840c0c712ae54e3.tar.xz |
Make XFA_MAPMODULESDATA a unique_ptr
Change-Id: Icd72ee8d098fa0140119519f7079745bd5280a84
Reviewed-on: https://pdfium-review.googlesource.com/17592
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjx_node.h')
-rw-r--r-- | fxjs/cjx_node.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h index 80ee6ae4b2..a8b579c399 100644 --- a/fxjs/cjx_node.h +++ b/fxjs/cjx_node.h @@ -7,7 +7,7 @@ #ifndef FXJS_CJX_NODE_H_ #define FXJS_CJX_NODE_H_ -#include <map> +#include <memory> #include "core/fxcrt/unowned_ptr.h" #include "fxjs/cjx_object.h" @@ -21,20 +21,6 @@ struct XFA_MAPDATABLOCKCALLBACKINFO { PD_CALLBACK_DUPLICATEDATA pCopy; }; -struct XFA_MAPDATABLOCK { - uint8_t* GetData() const { return (uint8_t*)this + sizeof(XFA_MAPDATABLOCK); } - XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo; - int32_t iBytes; -}; - -struct XFA_MAPMODULEDATA { - XFA_MAPMODULEDATA(); - ~XFA_MAPMODULEDATA(); - - std::map<void*, void*> m_ValueMap; - std::map<void*, XFA_MAPDATABLOCK*> m_BufferMap; -}; - enum XFA_SOM_MESSAGETYPE { XFA_SOM_ValidationMessage, XFA_SOM_FormatMessage, @@ -44,6 +30,8 @@ enum XFA_SOM_MESSAGETYPE { class CFXJSE_Arguments; class CXFA_Node; +struct XFA_MAPMODULEDATA; + class CJX_Node : public CJX_Object { public: explicit CJX_Node(CXFA_Node* node); @@ -123,7 +111,7 @@ class CJX_Node : public CJX_Object { bool TryNamespace(WideString& wsNamespace); - void MergeAllData(void* pDstModule); + void MergeAllData(CXFA_Node* pDstModule); void ThrowMissingPropertyException(const WideString& obj, const WideString& prop) const; @@ -453,7 +441,7 @@ class CJX_Node : public CJX_Object { int32_t execSingleEventByName(const WideStringView& wsEventName, XFA_Element eType); - XFA_MAPMODULEDATA* map_module_data_; + std::unique_ptr<XFA_MAPMODULEDATA> map_module_data_; }; #endif // FXJS_CJX_NODE_H_ |