diff options
author | weili <weili@chromium.org> | 2016-08-03 11:06:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-03 11:06:49 -0700 |
commit | 2d5b020304e8a9aa8afeb632c61daa7ece87e36d (patch) | |
tree | 4d7f04d4800577fa597b4ca1f1b4d31b87194ef0 /fpdfsdk/fpdfxfa/include/fpdfxfa_app.h | |
parent | ca27127240fbca2184f1c576b15b5212d5b314e6 (diff) | |
download | pdfium-2d5b020304e8a9aa8afeb632c61daa7ece87e36d.tar.xz |
Use smart pointers for class owned pointers
For all classes under /fpdfsdk, use smart pointer to replace
raw pointer type for class owned member variables so that memory
management will be easier.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2173253002
Diffstat (limited to 'fpdfsdk/fpdfxfa/include/fpdfxfa_app.h')
-rw-r--r-- | fpdfsdk/fpdfxfa/include/fpdfxfa_app.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h b/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h index 5ebb2c2623..18cac4405b 100644 --- a/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h +++ b/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h @@ -21,7 +21,7 @@ class CPDFXFA_App : public IXFA_AppProvider { ~CPDFXFA_App() override; FX_BOOL Initialize(v8::Isolate* pIsolate); - CXFA_FFApp* GetXFAApp() { return m_pXFAApp; } + CXFA_FFApp* GetXFAApp() { return m_pXFAApp.get(); } FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv); FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv); @@ -74,9 +74,8 @@ class CPDFXFA_App : public IXFA_AppProvider { protected: FX_BOOL m_bJavaScriptInitialized; - CXFA_FFApp* m_pXFAApp; + std::unique_ptr<CXFA_FFApp> m_pXFAApp; v8::Isolate* m_pIsolate; - IFXJS_Runtime* m_pJSRuntime; CFX_WideString m_csAppType; }; |