| Index: core/fpdfapi/parser/cfdf_document.cpp
|
| diff --git a/core/fpdfapi/parser/cfdf_document.cpp b/core/fpdfapi/parser/cfdf_document.cpp
|
| index a1518dfed099f6a69f6d389716232b840226441b..1239fcd3ce2d3706a5a805500616ef593dfa7ee6 100644
|
| --- a/core/fpdfapi/parser/cfdf_document.cpp
|
| +++ b/core/fpdfapi/parser/cfdf_document.cpp
|
| @@ -26,8 +26,7 @@ CFDF_Document::~CFDF_Document() {
|
|
|
| CFDF_Document* CFDF_Document::CreateNewDoc() {
|
| CFDF_Document* pDoc = new CFDF_Document;
|
| - pDoc->m_pRootDict = new CPDF_Dictionary(pDoc->GetByteStringPool());
|
| - pDoc->AddIndirectObject(pDoc->m_pRootDict);
|
| + pDoc->m_pRootDict = pDoc->AddIndirectDictionary(pDoc->GetByteStringPool());
|
| pDoc->m_pRootDict->SetFor("FDF",
|
| new CPDF_Dictionary(pDoc->GetByteStringPool()));
|
| return pDoc;
|
| @@ -69,7 +68,8 @@ void CFDF_Document::ParseStream(IFX_FileRead* pFile, FX_BOOL bOwnFile) {
|
| if (!pObj)
|
| break;
|
|
|
| - ReplaceIndirectObjectIfHigherGeneration(objnum, pObj);
|
| + // TODO(tsepez): check |pObj| ownership.
|
| + ReplaceIndirectObjectIfHigherGeneration(objnum, UniqueObject(pObj));
|
| word = parser.GetNextWord(nullptr);
|
| if (word != "endobj")
|
| break;
|
|
|