diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-23 17:21:01 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-24 16:41:29 +0000 |
commit | 08f4b7762a4453818c76c680f5295986e21418ce (patch) | |
tree | c6a771759b639180add570f4dd882d103f8efe9c /core/fpdfapi/edit/cpdf_creator.h | |
parent | 129b0135adf99be8e2c3015267a4689c6d62dca1 (diff) | |
download | pdfium-08f4b7762a4453818c76c680f5295986e21418ce.tar.xz |
Convert to CFX_UnownedPtr, part 4.
Fix strange ownership issue in cpdf_type3char.cpp, and
describe the absolutely insane stuff happening there.
Change-Id: Iae70f9eca8f125ed3ef677729f1776ba9f10183c
Reviewed-on: https://pdfium-review.googlesource.com/5830
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit/cpdf_creator.h')
-rw-r--r-- | core/fpdfapi/edit/cpdf_creator.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/core/fpdfapi/edit/cpdf_creator.h b/core/fpdfapi/edit/cpdf_creator.h index 618fffde79..f141c3880a 100644 --- a/core/fpdfapi/edit/cpdf_creator.h +++ b/core/fpdfapi/edit/cpdf_creator.h @@ -12,6 +12,7 @@ #include <vector> #include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_basic.h" class CPDF_Array; @@ -40,9 +41,9 @@ class CPDF_Creator { uint32_t GetNextObjectNumber() { return ++m_dwLastObjNum; } uint32_t GetLastObjectNumber() const { return m_dwLastObjNum; } CPDF_CryptoHandler* GetCryptoHandler() { return m_pCryptoHandler.Get(); } - CPDF_Document* GetDocument() const { return m_pDocument; } + CPDF_Document* GetDocument() const { return m_pDocument.Get(); } CPDF_Array* GetIDArray() const { return m_pIDArray.get(); } - CPDF_Dictionary* GetEncryptDict() const { return m_pEncryptDict; } + CPDF_Dictionary* GetEncryptDict() const { return m_pEncryptDict.Get(); } uint32_t GetEncryptObjectNumber() const { return m_dwEncryptObjNum; } uint32_t GetObjectOffset(uint32_t objnum) { return m_ObjectOffsets[objnum]; } @@ -79,13 +80,13 @@ class CPDF_Creator { bool IsXRefNeedEnd(); - CPDF_Document* const m_pDocument; - CPDF_Parser* const m_pParser; + CFX_UnownedPtr<CPDF_Document> const m_pDocument; + CFX_UnownedPtr<CPDF_Parser> const m_pParser; bool m_bSecurityChanged; - CPDF_Dictionary* m_pEncryptDict; + CFX_UnownedPtr<CPDF_Dictionary> m_pEncryptDict; uint32_t m_dwEncryptObjNum; CFX_RetainPtr<CPDF_CryptoHandler> m_pCryptoHandler; - CPDF_Object* m_pMetadata; + CFX_UnownedPtr<CPDF_Object> m_pMetadata; uint32_t m_dwLastObjNum; std::unique_ptr<IFX_ArchiveStream> m_Archive; FX_FILESIZE m_SavedOffset; |