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/cpdf_document.cpp | |
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/cpdf_document.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_parser/cpdf_document.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp index a05a24e07f..31d44b01fe 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp @@ -729,9 +729,9 @@ uint32_t CPDF_Document::GetUserPermissions() const { } FX_BOOL CPDF_Document::IsFormStream(uint32_t objnum, FX_BOOL& bForm) const { - auto it = m_IndirectObjs.find(objnum); - if (it != m_IndirectObjs.end()) { - CPDF_Stream* pStream = it->second->AsStream(); + CPDF_Object* pObj = GetIndirectObject(objnum); + if (pObj) { + CPDF_Stream* pStream = pObj->AsStream(); bForm = pStream && pStream->GetDict()->GetStringBy("Subtype") == "Form"; return TRUE; } |