summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_document.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_document.h')
-rw-r--r--core/fpdfapi/parser/cpdf_document.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h
index f7fb6308c1..493c1edb32 100644
--- a/core/fpdfapi/parser/cpdf_document.h
+++ b/core/fpdfapi/parser/cpdf_document.h
@@ -50,7 +50,7 @@ class CPDF_Document : public CPDF_IndirectObjectHolder {
CPDF_Parser* GetParser() const { return m_pParser.get(); }
CPDF_Dictionary* GetRoot() const { return m_pRootDict; }
- CPDF_Dictionary* GetInfo() const { return m_pInfoDict; }
+ CPDF_Dictionary* GetInfo() const { return m_pInfoDict.Get(); }
void DeletePage(int iPage);
int GetPageCount() const;
@@ -131,13 +131,18 @@ class CPDF_Document : public CPDF_IndirectObjectHolder {
void ResetTraversal();
std::unique_ptr<CPDF_Parser> m_pParser;
- CPDF_Dictionary* m_pRootDict;
- CPDF_Dictionary* m_pInfoDict;
+
+ // TODO(tsepez): figure out why tests break if this is an UnownedPtr.
+ CPDF_Dictionary* m_pRootDict; // Not owned.
+
+ CFX_UnownedPtr<CPDF_Dictionary> m_pInfoDict;
+
// Vector of pairs to know current position in the page tree. The index in the
// vector corresponds to the level being described. The pair contains a
// pointer to the dictionary being processed at the level, and an index of the
// of the child being processed within the dictionary's /Kids array.
std::vector<std::pair<CPDF_Dictionary*, size_t>> m_pTreeTraversal;
+
// Index of the next page that will be traversed from the page tree.
int m_iNextPageToTraverse;
bool m_bReachedMaxPageLevel;