diff options
author | dsinclair <dsinclair@chromium.org> | 2016-08-23 20:14:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-23 20:14:27 -0700 |
commit | e07edce5b253bc4f2bef6888c5b1cbf0b320a919 (patch) | |
tree | 85b2d31b4f3630753553efb9399a429ab0e7271c /core/fpdfapi/fpdf_parser/include | |
parent | 03bd7c78ff0411f0db033b5e6b5bf00c7fe2fb87 (diff) | |
download | pdfium-e07edce5b253bc4f2bef6888c5b1cbf0b320a919.tar.xz |
Make indirect object holder private.
This CL moves the m_IndirectObjs map to be private to the IndirectObjectHolder.
Various bits of code have been updated to use the accessors to the map.
This CL fixes the issue with the last time this landed by removing the objnum
check from GetIndirectObject() which appears to have caused the crashes.
Review-Url: https://codereview.chromium.org/2275703002
Diffstat (limited to 'core/fpdfapi/fpdf_parser/include')
-rw-r--r-- | core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h b/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h index 31e0aba5ea..27a9bc39db 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h @@ -22,6 +22,7 @@ class CPDF_IndirectObjectHolder { explicit CPDF_IndirectObjectHolder(CPDF_Parser* pParser); ~CPDF_IndirectObjectHolder(); + CPDF_Object* GetIndirectObject(uint32_t objnum) const; CPDF_Object* GetOrParseIndirectObject(uint32_t objnum); void ReleaseIndirectObject(uint32_t objnum); @@ -40,10 +41,10 @@ class CPDF_IndirectObjectHolder { protected: CPDF_Parser* m_pParser; - std::map<uint32_t, CPDF_Object*> m_IndirectObjs; private: uint32_t m_LastObjNum; + std::map<uint32_t, CPDF_Object*> m_IndirectObjs; }; #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_INDIRECT_OBJECT_HOLDER_H_ |