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

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

Issue 2442663005: Revert of Fix loading page using hint tables. (Closed)
Patch Set: Created 4 years, 2 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 | « BUILD.gn ('k') | core/fpdfapi/parser/cpdf_document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/parser/cpdf_data_avail.cpp
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp
index e52d0611f973867ac99cda381837d1872df6f787..e23aa8ecfbd6bc063d11c1be8c70ed17211884ce 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp
@@ -1625,8 +1625,6 @@
nResult = m_pHintTables->CheckPage(dwPage, pHints);
if (nResult != DataAvailable)
return nResult;
- // We should say to the document, which object is the page.
- m_pDocument->SetPageObjNum(dwPage, GetPage(dwPage)->GetObjNum());
m_pagesLoadState.insert(dwPage);
return DataAvailable;
}
@@ -1765,18 +1763,11 @@
uint32_t dwObjNum = 0;
bool bPagePosGot = m_pHintTables->GetPagePos(index, &szPageStartPos,
&szPageLength, &dwObjNum);
- if (!dwObjNum)
- return nullptr;
- // Page object already can be parsed in document.
- CPDF_Object* pPageDict = m_pDocument->GetIndirectObject(dwObjNum);
- if (pPageDict)
- return pPageDict->GetDict();
-
if (!bPagePosGot)
return nullptr;
m_syntaxParser.InitParser(m_pFileRead, (uint32_t)szPageStartPos);
- pPageDict = ParseIndirectObjectAt(0, dwObjNum, m_pDocument);
+ CPDF_Object* pPageDict = ParseIndirectObjectAt(0, dwObjNum, m_pDocument);
if (!pPageDict)
return nullptr;
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/parser/cpdf_document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698