Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2767)

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp

Issue 2275593002: IndirectObjectHolder API updates (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Missed one Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
index 94795fd60e284b09109ef5f37f8ce7c2a80227a0..58b69257addc8628cef46f8aa600f2cadf3b779b 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
@@ -176,7 +176,7 @@ FX_BOOL CPDF_DataAvail::IsObjectsAvail(
} else if (!pdfium::ContainsKey(m_ObjectSet, dwNum)) {
m_ObjectSet.insert(dwNum);
CPDF_Object* pReferred =
- m_pDocument->GetIndirectObject(pRef->GetRefObjNum());
+ m_pDocument->GetOrParseIndirectObject(pRef->GetRefObjNum());
if (pReferred)
new_obj_array.Add(pReferred);
}
@@ -1788,8 +1788,10 @@ CPDF_Dictionary* CPDF_DataAvail::GetPage(int index) {
if (!pPageDict)
return nullptr;
- if (!m_pDocument->InsertIndirectObject(dwObjNum, pPageDict))
+ if (!m_pDocument->ReplaceIndirectObjectIfHigherGeneration(dwObjNum,
+ pPageDict)) {
return nullptr;
+ }
return pPageDict->GetDict();
}
}
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_array_unittest.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698