summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cfdf_document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cfdf_document.cpp')
-rw-r--r--core/fpdfapi/parser/cfdf_document.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cfdf_document.cpp b/core/fpdfapi/parser/cfdf_document.cpp
index 1239fcd3ce..a1518dfed0 100644
--- a/core/fpdfapi/parser/cfdf_document.cpp
+++ b/core/fpdfapi/parser/cfdf_document.cpp
@@ -26,7 +26,8 @@ CFDF_Document::~CFDF_Document() {
CFDF_Document* CFDF_Document::CreateNewDoc() {
CFDF_Document* pDoc = new CFDF_Document;
- pDoc->m_pRootDict = pDoc->AddIndirectDictionary(pDoc->GetByteStringPool());
+ pDoc->m_pRootDict = new CPDF_Dictionary(pDoc->GetByteStringPool());
+ pDoc->AddIndirectObject(pDoc->m_pRootDict);
pDoc->m_pRootDict->SetFor("FDF",
new CPDF_Dictionary(pDoc->GetByteStringPool()));
return pDoc;
@@ -68,8 +69,7 @@ void CFDF_Document::ParseStream(IFX_FileRead* pFile, FX_BOOL bOwnFile) {
if (!pObj)
break;
- // TODO(tsepez): check |pObj| ownership.
- ReplaceIndirectObjectIfHigherGeneration(objnum, UniqueObject(pObj));
+ ReplaceIndirectObjectIfHigherGeneration(objnum, pObj);
word = parser.GetNextWord(nullptr);
if (word != "endobj")
break;