summaryrefslogtreecommitdiff
path: root/fxjs/xfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-10 20:47:55 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-10 20:47:55 +0000
commit3ffde1bc73156098e78e5e303b3f5198a1d073b8 (patch)
treec3a13bfda69bfb9bc4a85855d588d64d27faaa57 /fxjs/xfa
parent326c38c4f2749e61fa2dec1d0f326e4099d6a24c (diff)
downloadpdfium-3ffde1bc73156098e78e5e303b3f5198a1d073b8.tar.xz
Rename GetTemplateNode to GetTemplateNodeIfExists
This CL makes it explicit that GetTemplateNodeIfExists can return nullptr. Various call sites are updated as needed. Change-Id: If6edd5962b59e7e4ce3dbe9bbdc957783cf76abe Reviewed-on: https://pdfium-review.googlesource.com/22678 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/xfa')
-rw-r--r--fxjs/xfa/cjx_object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp
index a1d9dafd7b..7b1bb3cbef 100644
--- a/fxjs/xfa/cjx_object.cpp
+++ b/fxjs/xfa/cjx_object.cpp
@@ -972,7 +972,7 @@ void CJX_Object::SetMapModuleValue(void* pKey, void* pValue) {
bool CJX_Object::GetMapModuleValue(void* pKey, void*& pValue) {
for (CXFA_Node* pNode = ToNode(GetXFAObject()); pNode;
- pNode = pNode->GetTemplateNode()) {
+ pNode = pNode->GetTemplateNodeIfExists()) {
XFA_MAPMODULEDATA* pModule = pNode->JSObject()->GetMapModuleData();
if (pModule) {
auto it = pModule->m_ValueMap.find(pKey);
@@ -1032,7 +1032,7 @@ bool CJX_Object::GetMapModuleBuffer(void* pKey,
bool bProtoAlso) const {
XFA_MAPDATABLOCK* pBuffer = nullptr;
for (const CXFA_Node* pNode = ToNode(GetXFAObject()); pNode;
- pNode = pNode->GetTemplateNode()) {
+ pNode = pNode->GetTemplateNodeIfExists()) {
XFA_MAPMODULEDATA* pModule = pNode->JSObject()->GetMapModuleData();
if (pModule) {
auto it = pModule->m_BufferMap.find(pKey);