diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2018-07-11 13:43:52 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-11 13:43:52 +0000 |
commit | e7e454da8e382513b9e271bb3e0be3bd901bfbd9 (patch) | |
tree | b74fcf7180ba693b56427d5a338526c47010eb06 /core/fpdfapi | |
parent | b66077d3ef7ba594f2a831840783549f4dd70d86 (diff) | |
download | pdfium-e7e454da8e382513b9e271bb3e0be3bd901bfbd9.tar.xz |
Do not store cross ref v5 obj within document.
Currently, not necessary to store the cross ref v5 obj within
CPDF_IndirectObjectHolder(CPDF_Document), because all
necessary data from the cross ref are parsed or cloned, and
owned by CPDF_Parser seperately from CPDF_IndirectObjectHolder.
Also this fix regression from commit 4ea4459e.
BUG=chromium:810768
Change-Id: I0d1a11ff027210f4f15804a69d12416838ec9815
Reviewed-on: https://pdfium-review.googlesource.com/37110
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/parser/cpdf_parser.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp index e372f1272c..f7846eff31 100644 --- a/core/fpdfapi/parser/cpdf_parser.cpp +++ b/core/fpdfapi/parser/cpdf_parser.cpp @@ -977,16 +977,7 @@ bool CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, bool bMainXRef) { if (!objnum) return false; - CPDF_Object* pUnownedObject = pObject.get(); - const CPDF_Dictionary* pRootDict = GetRoot(); - if (pRootDict && pRootDict->GetObjNum() == objnum) - return false; - if (!m_pObjectsHolder->ReplaceIndirectObjectIfHigherGeneration( - objnum, std::move(pObject))) { - return false; - } - - CPDF_Stream* pStream = pUnownedObject->AsStream(); + CPDF_Stream* pStream = pObject->AsStream(); if (!pStream) return false; |