summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlelement.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-04-17 21:34:18 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-17 21:34:18 +0000
commit13aa65a71294cac6e4bdaab73ddd6f4b9fcd8676 (patch)
tree478874bff3e2831949884adfe750a4924832eb54 /core/fxcrt/xml/cfx_xmlelement.cpp
parent35939f83e45b67de4ccc8c3e70e5e00be40326b6 (diff)
downloadpdfium-13aa65a71294cac6e4bdaab73ddd6f4b9fcd8676.tar.xz
Add ownership to CFX_XMLNode children
This CL sets the CFX_XML tree ownership. The pointers set into the tree must be unique_ptrs and the CFX_XMLNode children are set to be either unique_ptrs or UnownedPtrs. Change-Id: Ib0db495c81471e40f5b4533503f7bbe5a784fd77 Reviewed-on: https://pdfium-review.googlesource.com/30711 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlelement.cpp')
-rw-r--r--core/fxcrt/xml/cfx_xmlelement.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxcrt/xml/cfx_xmlelement.cpp b/core/fxcrt/xml/cfx_xmlelement.cpp
index c54d8488a3..d37c55c443 100644
--- a/core/fxcrt/xml/cfx_xmlelement.cpp
+++ b/core/fxcrt/xml/cfx_xmlelement.cpp
@@ -90,7 +90,7 @@ WideString CFX_XMLElement::GetTextData() const {
void CFX_XMLElement::SetTextData(const WideString& wsText) {
if (wsText.GetLength() < 1)
return;
- AppendChild(new CFX_XMLText(wsText));
+ AppendChild(pdfium::MakeUnique<CFX_XMLText>(wsText));
}
void CFX_XMLElement::Save(const RetainPtr<IFX_SeekableStream>& pXMLStream) {