diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-25 12:03:18 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-25 19:16:31 +0000 |
commit | 797ca5cad52edde7c65da45a15216f20b1bfd8fd (patch) | |
tree | 811a96d5f505e7cff89395cea7dff89604fc9133 /xfa/fxfa/parser/cxfa_node.cpp | |
parent | 3a4c408554f2f2ffb5a143f6dadcdd528fcf106e (diff) | |
download | pdfium-797ca5cad52edde7c65da45a15216f20b1bfd8fd.tar.xz |
Mass conversion of all const-lifetime class members
Sed + minimal conversions to compile, including moving some
constructors into the .cpp file. Any that caused ASAN issues
during the tests were omitted rather than trying to resolve
the underlying issue.
Change-Id: I00a421f33b253eb4071ffd9af3f2922c7443b335
Reviewed-on: https://pdfium-review.googlesource.com/5891
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index e7ec4cf890..2daa49e066 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -1040,7 +1040,7 @@ void CXFA_Node::Script_Som_ResolveNodeList(CFXJSE_Value* pValue, refNode = this; pScriptContext->ResolveObjects(refNode, wsExpression.AsStringC(), resoveNodeRS, dwFlag); - CXFA_ArrayNodeList* pNodeList = new CXFA_ArrayNodeList(m_pDocument); + CXFA_ArrayNodeList* pNodeList = new CXFA_ArrayNodeList(m_pDocument.Get()); if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) { for (CXFA_Object* pObject : resoveNodeRS.objects) { if (pObject->IsNode()) @@ -1083,7 +1083,8 @@ void CXFA_Node::Script_TreeClass_Nodes(CFXJSE_Value* pValue, CFX_WideString wsMessage = L"Unable to set "; FXJSE_ThrowMessage(wsMessage.UTF8Encode().AsStringC()); } else { - CXFA_AttachNodeList* pNodeList = new CXFA_AttachNodeList(m_pDocument, this); + CXFA_AttachNodeList* pNodeList = + new CXFA_AttachNodeList(m_pDocument.Get(), this); pValue->SetObject(pNodeList, pScriptContext->GetJseNormalClass()); } } @@ -1282,7 +1283,8 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) { bIgnoreRoot = !!pArguments->GetInt32(1); if (iLength >= 3) bOverwrite = !!pArguments->GetInt32(2); - auto pParser = pdfium::MakeUnique<CXFA_SimpleParser>(m_pDocument, false); + auto pParser = + pdfium::MakeUnique<CXFA_SimpleParser>(m_pDocument.Get(), false); if (!pParser) return; CFX_XMLNode* pXMLNode = pParser->ParseXMLData(wsExpression); @@ -1524,7 +1526,7 @@ void CXFA_Node::Script_NodeClass_OneOfChild(CFXJSE_Value* pValue, void CXFA_Node::Script_ContainerClass_GetDelta(CFXJSE_Arguments* pArguments) {} void CXFA_Node::Script_ContainerClass_GetDeltas(CFXJSE_Arguments* pArguments) { - CXFA_ArrayNodeList* pFormNodes = new CXFA_ArrayNodeList(m_pDocument); + CXFA_ArrayNodeList* pFormNodes = new CXFA_ArrayNodeList(m_pDocument.Get()); pArguments->GetReturnValue()->SetObject( pFormNodes, m_pDocument->GetScriptContext()->GetJseNormalClass()); } @@ -3269,7 +3271,7 @@ void CXFA_Node::Script_Form_FormNodes(CFXJSE_Arguments* pArguments) { } std::vector<CXFA_Node*> formItems; - CXFA_ArrayNodeList* pFormNodes = new CXFA_ArrayNodeList(m_pDocument); + CXFA_ArrayNodeList* pFormNodes = new CXFA_ArrayNodeList(m_pDocument.Get()); pFormNodes->SetArrayNodeList(formItems); pArguments->GetReturnValue()->SetObject( pFormNodes, m_pDocument->GetScriptContext()->GetJseNormalClass()); |