summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_object_imp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-14 14:36:49 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-14 14:36:49 -0700
commitee2abec93f22bd10522181dc0362f24d389fc66b (patch)
tree2cff233c1008c6b13b58e831dabee363f314784f /xfa/fxfa/parser/xfa_object_imp.cpp
parente7b0a2d5c47a88fb29ed9d100d670e7185b8d213 (diff)
downloadpdfium-ee2abec93f22bd10522181dc0362f24d389fc66b.tar.xz
Cleanup ownership in CXFA_ScriptContext.
This Cl substitutes some unique_ptrs for various bits of manual memory management in CXFA_ScriptContext. Review-Url: https://codereview.chromium.org/2062113002
Diffstat (limited to 'xfa/fxfa/parser/xfa_object_imp.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index 10bac30708..0f36d68aa6 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -5086,7 +5086,8 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pSrcModule,
}
CXFA_NodeList::CXFA_NodeList(CXFA_Document* pDocument)
: CXFA_Object(pDocument, XFA_OBJECTTYPE_NodeList) {
- m_pDocument->GetScriptContext()->CacheList(this);
+ m_pDocument->GetScriptContext()->AddToCacheList(
+ std::unique_ptr<CXFA_NodeList>(this));
}
CXFA_Node* CXFA_NodeList::NamedItem(const CFX_WideStringC& wsName) {
uint32_t dwHashCode = FX_HashCode_GetW(wsName, false);