summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_array.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-04 18:12:16 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-04 18:12:17 -0700
commit98c6c15abfec45648d85c73e746f0cb109a8d35b (patch)
tree85fe31ac718cd4aa7600b2ea2881d5ac82b9f02a /core/fpdfapi/parser/cpdf_array.h
parent4d29e78fc80285d222f2bad916354e3db970d0cc (diff)
downloadpdfium-98c6c15abfec45648d85c73e746f0cb109a8d35b.tar.xz
Fix ownership when making a private annot dictionary into a shared one.
There's no way to take ownership back from the CPDF_Array without deleting the object, so add a new primitive to make elements become indirect rather than manipulating them outside the class. This should solve the ASSERT(objnum == 0) issue that blocked the previous roll. Review-Url: https://codereview.chromium.org/2391883003
Diffstat (limited to 'core/fpdfapi/parser/cpdf_array.h')
-rw-r--r--core/fpdfapi/parser/cpdf_array.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index 25bbdd56f2..da9677e927 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -46,6 +46,7 @@ class CPDF_Array : public CPDF_Object {
void SetAt(size_t index, CPDF_Object* pObj);
void InsertAt(size_t index, CPDF_Object* pObj);
void RemoveAt(size_t index, size_t nCount = 1);
+ void ConvertToIndirectObjectAt(size_t index, CPDF_IndirectObjectHolder* pDoc);
void Add(CPDF_Object* pObj);
void AddNumber(FX_FLOAT f);