summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cfdf_document.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-10-14 17:45:56 -0700
committerTom Sepez <tsepez@chromium.org>2016-10-14 17:45:56 -0700
commitc25a4219431c90a95233a08f25eecc921abbf3ed (patch)
treebd2ad923d527440785c19623fe2d19cc1a70a92d /core/fpdfapi/parser/cfdf_document.cpp
parent62f367348ff8ff1e64c6f52c1ee5f77c3a89edc1 (diff)
downloadpdfium-c25a4219431c90a95233a08f25eecc921abbf3ed.tar.xz
Revert "Update CPDF_IndirectObjectHolder APIs for unique objects."
This reverts commit 3ba098595ae56b64eacc0c25ab76b89a4d78d920. TBR=thestig@chromium.org,weili@chromium.org Review URL: https://codereview.chromium.org/2424533003 .
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;