Replace UnownedPtr with RetainPtr to parser objects in fpdfdoc
Bug: chromium:983867
Change-Id: Ib07bfb48ef85ee7a013f5e1a3d2127648dc950ba
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/57854
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfdoc/cpdf_aaction.h b/core/fpdfdoc/cpdf_aaction.h
index 699d913..8b44153 100644
--- a/core/fpdfdoc/cpdf_aaction.h
+++ b/core/fpdfdoc/cpdf_aaction.h
@@ -8,6 +8,7 @@
#define CORE_FPDFDOC_CPDF_AACTION_H_
#include "core/fpdfdoc/cpdf_action.h"
+#include "core/fxcrt/retain_ptr.h"
class CPDF_Dictionary;
@@ -50,7 +51,7 @@
static bool IsUserClick(AActionType eType);
private:
- UnownedPtr<CPDF_Dictionary> const m_pDict;
+ RetainPtr<CPDF_Dictionary> const m_pDict;
};
#endif // CORE_FPDFDOC_CPDF_AACTION_H_
diff --git a/core/fpdfdoc/cpdf_action.h b/core/fpdfdoc/cpdf_action.h
index 6ea1c63..f55c42a 100644
--- a/core/fpdfdoc/cpdf_action.h
+++ b/core/fpdfdoc/cpdf_action.h
@@ -9,6 +9,7 @@
#include "core/fpdfdoc/cpdf_dest.h"
#include "core/fxcrt/fx_string.h"
+#include "core/fxcrt/retain_ptr.h"
class CPDF_Dictionary;
class CPDF_Document;
@@ -56,7 +57,7 @@
CPDF_Action GetSubAction(size_t iIndex) const;
private:
- UnownedPtr<CPDF_Dictionary> const m_pDict;
+ RetainPtr<CPDF_Dictionary> const m_pDict;
};
#endif // CORE_FPDFDOC_CPDF_ACTION_H_
diff --git a/core/fpdfdoc/cpdf_bookmark.h b/core/fpdfdoc/cpdf_bookmark.h
index 1081867..c2de6ff 100644
--- a/core/fpdfdoc/cpdf_bookmark.h
+++ b/core/fpdfdoc/cpdf_bookmark.h
@@ -10,7 +10,7 @@
#include "core/fpdfdoc/cpdf_action.h"
#include "core/fpdfdoc/cpdf_dest.h"
#include "core/fxcrt/fx_string.h"
-#include "core/fxcrt/unowned_ptr.h"
+#include "core/fxcrt/retain_ptr.h"
class CPDF_Dictionary;
class CPDF_Document;
@@ -31,7 +31,7 @@
CPDF_Action GetAction() const;
private:
- UnownedPtr<CPDF_Dictionary> m_pDict;
+ RetainPtr<CPDF_Dictionary> m_pDict;
};
#endif // CORE_FPDFDOC_CPDF_BOOKMARK_H_
diff --git a/core/fpdfdoc/cpdf_dest.h b/core/fpdfdoc/cpdf_dest.h
index 4d9bfb8..c1b1df3 100644
--- a/core/fpdfdoc/cpdf_dest.h
+++ b/core/fpdfdoc/cpdf_dest.h
@@ -9,7 +9,7 @@
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
-#include "core/fxcrt/unowned_ptr.h"
+#include "core/fxcrt/retain_ptr.h"
class CPDF_Document;
class CPDF_Array;
@@ -41,7 +41,7 @@
float* pZoom) const;
private:
- UnownedPtr<CPDF_Array> const m_pArray;
+ RetainPtr<CPDF_Array> const m_pArray;
};
#endif // CORE_FPDFDOC_CPDF_DEST_H_