summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_docjsactions.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_docjsactions.h')
-rw-r--r--core/fpdfdoc/cpdf_docjsactions.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fpdfdoc/cpdf_docjsactions.h b/core/fpdfdoc/cpdf_docjsactions.h
index 16b6be3d69..328b8869f6 100644
--- a/core/fpdfdoc/cpdf_docjsactions.h
+++ b/core/fpdfdoc/cpdf_docjsactions.h
@@ -8,6 +8,7 @@
#define CORE_FPDFDOC_CPDF_DOCJSACTIONS_H_
#include "core/fpdfdoc/cpdf_action.h"
+#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_string.h"
class CPDF_Document;
@@ -15,15 +16,16 @@ class CPDF_Document;
class CPDF_DocJSActions {
public:
explicit CPDF_DocJSActions(CPDF_Document* pDoc);
+ ~CPDF_DocJSActions();
int CountJSActions() const;
CPDF_Action GetJSActionAndName(int index, CFX_ByteString* csName) const;
CPDF_Action GetJSAction(const CFX_ByteString& csName) const;
int FindJSAction(const CFX_ByteString& csName) const;
- CPDF_Document* GetDocument() const { return m_pDocument; }
+ CPDF_Document* GetDocument() const { return m_pDocument.Get(); }
private:
- CPDF_Document* const m_pDocument;
+ CFX_UnownedPtr<CPDF_Document> const m_pDocument;
};
#endif // CORE_FPDFDOC_CPDF_DOCJSACTIONS_H_