Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: core/fpdfapi/fpdf_page/cpdf_clippathdata.h

Issue 1998583002: Fix leak in CPDF_StreamContentParser::AddTextObject(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: CollectionSize Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_clippath.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_clippathdata.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_clippathdata.h
diff --git a/core/fpdfapi/fpdf_page/cpdf_clippathdata.h b/core/fpdfapi/fpdf_page/cpdf_clippathdata.h
index 05a247f7535dfc5a04d075467763225840fe67a6..70e2b1b096aa38820a0560dcebe04a1dd9cdaa68 100644
--- a/core/fpdfapi/fpdf_page/cpdf_clippathdata.h
+++ b/core/fpdfapi/fpdf_page/cpdf_clippathdata.h
@@ -9,22 +9,22 @@
#include <stdint.h>
+#include <memory>
+#include <utility>
+#include <vector>
+
class CPDF_Path;
class CPDF_TextObject;
class CPDF_ClipPathData {
public:
+ using PathAndTypeData = std::pair<CPDF_Path, uint8_t>;
CPDF_ClipPathData();
CPDF_ClipPathData(const CPDF_ClipPathData&);
~CPDF_ClipPathData();
- void SetCount(int path_count, int text_count);
-
- int m_PathCount;
- CPDF_Path* m_pPathList;
- uint8_t* m_pTypeList;
- int m_TextCount;
- CPDF_TextObject** m_pTextList;
+ std::vector<PathAndTypeData> m_PathAndTypeList;
+ std::vector<std::unique_ptr<CPDF_TextObject>> m_TextList;
};
#endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_clippath.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_clippathdata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698