From 640d8ffad8536c789103892c7a4e69e5d30172c8 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 10 Jan 2018 16:28:57 +0000 Subject: Make methods which create nodes more obvious This CL converts the various methods Get methods which take a boolean value to explicit Get* and GetOrCreate* methods to make the usage clearer. Change-Id: I2af68448b1b69b95713e739bf7fe14a4336d2b65 Reviewed-on: https://pdfium-review.googlesource.com/22590 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_validate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_validate.cpp') diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp index 35479ca1f5..c124c3052a 100644 --- a/xfa/fxfa/parser/cxfa_validate.cpp +++ b/xfa/fxfa/parser/cxfa_validate.cpp @@ -75,7 +75,7 @@ XFA_AttributeEnum CXFA_Validate::GetScriptTest() { WideString CXFA_Validate::GetMessageText(const WideString& wsMessageType) { CXFA_Message* pNode = - JSObject()->GetProperty(0, XFA_Element::Message, false); + JSObject()->GetProperty(0, XFA_Element::Message); if (!pNode) return L""; @@ -119,7 +119,7 @@ void CXFA_Validate::SetScriptMessageText(const WideString& wsMessage) { void CXFA_Validate::SetMessageText(const WideString& wsMessageType, const WideString& wsMessage) { CXFA_Message* pNode = - JSObject()->GetProperty(0, XFA_Element::Message, true); + JSObject()->GetOrCreateProperty(0, XFA_Element::Message); if (!pNode) return; -- cgit v1.2.3