Chromium Code Reviews| 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..aa9363e6618614dd642339348c3955760b38a898 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); |
| + ReplaceIndirectObjectIfHigherGeneration(objnum, |
| + UniqueObject(pObj)); // Owner? |
|
Lei Zhang
2016/10/14 23:18:04
There's a few of these "// Owner?" comments. Shoul
Tom Sepez
2016/10/14 23:42:29
Done.
|
| word = parser.GetNextWord(nullptr); |
| if (word != "endobj") |
| break; |