summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_creator.cpp2
-rw-r--r--core/fpdfapi/edit/cpdf_creator.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp
index c060f5897b..e176d85044 100644
--- a/core/fpdfapi/edit/cpdf_creator.cpp
+++ b/core/fpdfapi/edit/cpdf_creator.cpp
@@ -807,7 +807,7 @@ void CPDF_Creator::InitID() {
CPDF_SecurityHandler handler;
handler.OnCreate(m_pEncryptDict.Get(), m_pIDArray.get(),
user_pass.raw_str(), user_pass.GetLength(), flag);
- m_pCryptoHandler = pdfium::MakeRetain<CPDF_CryptoHandler>();
+ m_pCryptoHandler = pdfium::MakeUnique<CPDF_CryptoHandler>();
m_pCryptoHandler->Init(m_pEncryptDict.Get(), &handler);
m_bSecurityChanged = true;
}
diff --git a/core/fpdfapi/edit/cpdf_creator.h b/core/fpdfapi/edit/cpdf_creator.h
index e8fe18f87d..4e8f9e8dbe 100644
--- a/core/fpdfapi/edit/cpdf_creator.h
+++ b/core/fpdfapi/edit/cpdf_creator.h
@@ -12,6 +12,7 @@
#include <vector>
#include "core/fxcrt/fx_stream.h"
+#include "core/fxcrt/maybe_owned.h"
#include "core/fxcrt/retain_ptr.h"
#include "core/fxcrt/unowned_ptr.h"
@@ -85,7 +86,7 @@ class CPDF_Creator {
bool m_bSecurityChanged;
UnownedPtr<CPDF_Dictionary> m_pEncryptDict;
uint32_t m_dwEncryptObjNum;
- RetainPtr<CPDF_CryptoHandler> m_pCryptoHandler;
+ fxcrt::MaybeOwned<CPDF_CryptoHandler> m_pCryptoHandler;
UnownedPtr<CPDF_Object> m_pMetadata;
uint32_t m_dwLastObjNum;
std::unique_ptr<IFX_ArchiveStream> m_Archive;