diff options
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 9 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_context.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp index 36d86650b7..446a77ea96 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp @@ -341,9 +341,8 @@ bool CPDFXFA_Context::PutRequestURL(const WideString& wsURL, m_pFormFillEnv->PutRequestURL(wsURL, wsData, wsEncode); } -IFWL_AdapterTimerMgr* CPDFXFA_Context::GetTimerMgr() { - CXFA_FWLAdapterTimerMgr* pAdapter = nullptr; - if (m_pFormFillEnv) - pAdapter = new CXFA_FWLAdapterTimerMgr(m_pFormFillEnv.Get()); - return pAdapter; +std::unique_ptr<IFWL_AdapterTimerMgr> CPDFXFA_Context::GetTimerMgr() { + if (!m_pFormFillEnv) + return nullptr; + return pdfium::MakeUnique<CXFA_FWLAdapterTimerMgr>(m_pFormFillEnv.Get()); } diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h index b240e7ee11..6458926a68 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h @@ -91,7 +91,7 @@ class CPDFXFA_Context : public CPDF_Document::Extension, const WideString& wsData, const WideString& wsEncode) override; - IFWL_AdapterTimerMgr* GetTimerMgr() override; + std::unique_ptr<IFWL_AdapterTimerMgr> GetTimerMgr() override; protected: friend class CPDFXFA_DocEnvironment; |