diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-02 21:22:28 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-02 21:22:28 +0000 |
commit | 0c9c70bdf9bcda1df54f1bc74016ce49dffb58b6 (patch) | |
tree | 8db921c8b4902aab022ec5b8b729e37192a17c64 /fxjs/cjx_node.h | |
parent | c130381fd038893c1ee62a34648764d39d138b2c (diff) | |
download | pdfium-0c9c70bdf9bcda1df54f1bc74016ce49dffb58b6.tar.xz |
Split CJX_Node::RemoveMapModuleKey
This CL splits RemoveMapModuleKey to extract ClearMapModuleBuffer which
is called on destroy to clear the buffer.
This also fixes a potential bug where when we lookup the key, if the
hashcode for the key returns 0 we will end up with a nullptr key.
Change-Id: Ic2b0529a999f6f789dd81fbc4e02ecfbbf7a7632
Reviewed-on: https://pdfium-review.googlesource.com/17614
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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fxjs/cjx_node.h b/fxjs/cjx_node.h index 77092d434b..8a67d3f0fc 100644 --- a/fxjs/cjx_node.h +++ b/fxjs/cjx_node.h @@ -67,7 +67,7 @@ class CJX_Node : public CJX_Object { const WideString& wsXMLValue, bool bNotify, bool bScriptModify); - bool RemoveAttribute(const WideStringView& wsAttr); + void RemoveAttribute(const WideStringView& wsAttr); CXFA_Node* GetProperty(int32_t index, XFA_Element eType, @@ -443,7 +443,8 @@ class CJX_Node : public CJX_Object { int32_t& iBytes, bool bProtoAlso) const; bool HasMapModuleKey(void* pKey); - void RemoveMapModuleKey(void* pKey = nullptr); + void ClearMapModuleBuffer(); + void RemoveMapModuleKey(void* pKey); void MoveBufferMapData(CXFA_Node* pDstModule, void* pKey); void MoveBufferMapData(CXFA_Node* pSrcModule, CXFA_Node* pDstModule, |