summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_docjsactions.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-24 13:21:45 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 22:34:21 +0000
commitedc1e4e5baac33c8f2799e82ff52fd556d3c5e02 (patch)
tree0811327da4c67fe4babb07d299619382445c8be8 /core/fpdfdoc/cpdf_docjsactions.cpp
parent4734512572776f8fc705e28fba8a46d981372e99 (diff)
downloadpdfium-edc1e4e5baac33c8f2799e82ff52fd556d3c5e02.tar.xz
Convert to CFX_UnownedPtr, part 9
Change-Id: Ia1151e0855accda0873251938a521df1913c73fa Reviewed-on: https://pdfium-review.googlesource.com/5852 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_docjsactions.cpp')
-rw-r--r--core/fpdfdoc/cpdf_docjsactions.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/fpdfdoc/cpdf_docjsactions.cpp b/core/fpdfdoc/cpdf_docjsactions.cpp
index c0e7a78fd6..59dbccce85 100644
--- a/core/fpdfdoc/cpdf_docjsactions.cpp
+++ b/core/fpdfdoc/cpdf_docjsactions.cpp
@@ -10,9 +10,11 @@
CPDF_DocJSActions::CPDF_DocJSActions(CPDF_Document* pDoc) : m_pDocument(pDoc) {}
+CPDF_DocJSActions::~CPDF_DocJSActions() {}
+
int CPDF_DocJSActions::CountJSActions() const {
ASSERT(m_pDocument);
- CPDF_NameTree name_tree(m_pDocument, "JavaScript");
+ CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
return name_tree.GetCount();
}
@@ -20,7 +22,7 @@ CPDF_Action CPDF_DocJSActions::GetJSActionAndName(
int index,
CFX_ByteString* csName) const {
ASSERT(m_pDocument);
- CPDF_NameTree name_tree(m_pDocument, "JavaScript");
+ CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
CPDF_Object* pAction = name_tree.LookupValueAndName(index, csName);
return ToDictionary(pAction) ? CPDF_Action(pAction->GetDict())
: CPDF_Action();
@@ -28,7 +30,7 @@ CPDF_Action CPDF_DocJSActions::GetJSActionAndName(
CPDF_Action CPDF_DocJSActions::GetJSAction(const CFX_ByteString& csName) const {
ASSERT(m_pDocument);
- CPDF_NameTree name_tree(m_pDocument, "JavaScript");
+ CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
CPDF_Object* pAction = name_tree.LookupValue(csName);
return ToDictionary(pAction) ? CPDF_Action(pAction->GetDict())
: CPDF_Action();
@@ -36,6 +38,6 @@ CPDF_Action CPDF_DocJSActions::GetJSAction(const CFX_ByteString& csName) const {
int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const {
ASSERT(m_pDocument);
- CPDF_NameTree name_tree(m_pDocument, "JavaScript");
+ CPDF_NameTree name_tree(m_pDocument.Get(), "JavaScript");
return name_tree.GetIndex(csName);
}