summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_reference.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_reference.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/parser/cpdf_reference.cpp b/core/fpdfapi/parser/cpdf_reference.cpp
index ff0442b6f5..4594fe9f44 100644
--- a/core/fpdfapi/parser/cpdf_reference.cpp
+++ b/core/fpdfapi/parser/cpdf_reference.cpp
@@ -65,7 +65,7 @@ std::unique_ptr<CPDF_Object> CPDF_Reference::CloneNonCyclic(
? pDirect->CloneNonCyclic(true, pVisited)
: nullptr;
}
- return pdfium::MakeUnique<CPDF_Reference>(m_pObjList, m_RefObjNum);
+ return pdfium::MakeUnique<CPDF_Reference>(m_pObjList.Get(), m_RefObjNum);
}
CPDF_Object* CPDF_Reference::SafeGetDirect() const {
diff --git a/core/fpdfapi/parser/cpdf_reference.h b/core/fpdfapi/parser/cpdf_reference.h
index 83bb0b48e7..ab160302fe 100644
--- a/core/fpdfapi/parser/cpdf_reference.h
+++ b/core/fpdfapi/parser/cpdf_reference.h
@@ -11,6 +11,7 @@
#include <set>
#include "core/fpdfapi/parser/cpdf_object.h"
+#include "core/fxcrt/cfx_unowned_ptr.h"
class CPDF_IndirectObjectHolder;
@@ -32,9 +33,8 @@ class CPDF_Reference : public CPDF_Object {
const CPDF_Reference* AsReference() const override;
bool WriteTo(IFX_ArchiveStream* archive) const override;
- CPDF_IndirectObjectHolder* GetObjList() const { return m_pObjList; }
+ CPDF_IndirectObjectHolder* GetObjList() const { return m_pObjList.Get(); }
uint32_t GetRefObjNum() const { return m_RefObjNum; }
-
void SetRef(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
protected:
@@ -43,7 +43,7 @@ class CPDF_Reference : public CPDF_Object {
std::set<const CPDF_Object*>* pVisited) const override;
CPDF_Object* SafeGetDirect() const;
- CPDF_IndirectObjectHolder* m_pObjList;
+ CFX_UnownedPtr<CPDF_IndirectObjectHolder> m_pObjList;
uint32_t m_RefObjNum;
};