Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: xfa/fxfa/parser/xfa_object_imp.cpp

Issue 2062113002: Cleanup ownership in CXFA_ScriptContext. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Review feedback Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | xfa/fxfa/parser/xfa_script_imp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_object_imp.cpp
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index 10bac30708399f41e7145711ebe33527bfe1628e..0f36d68aa6d3dd85ef45a8b82e50c6b4cbd17677 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);
« no previous file with comments | « no previous file | xfa/fxfa/parser/xfa_script_imp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698