diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-18 13:48:33 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-18 21:21:59 +0000 |
commit | f605c24fa76c9034184ed6a5054200962a0b6c07 (patch) | |
tree | ac9e02f447e0d3ca07155082eb84ea546fc73762 /core/fpdfapi/parser/cpdf_reference.h | |
parent | 940967de0b588d3abb9cba5822ae5f5c5fe05017 (diff) | |
download | pdfium-f605c24fa76c9034184ed6a5054200962a0b6c07.tar.xz |
Add more CFX_UnownedPtr usage.
One lifetime issue was fixed by passing CPDF_RenderStatus into
Continue() methods rather than holidng a pointer which was going
stale.
Bug:
Change-Id: I63b9dce4c1a0d1377cc407b5460535f7c916a040
Reviewed-on: https://pdfium-review.googlesource.com/5659
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_reference.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_reference.h | 6 |
1 files changed, 3 insertions, 3 deletions
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; }; |