summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-03 15:40:22 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-04 17:02:49 +0000
commit6088612c21898eb79cfbde401984176dd94c385c (patch)
tree4e9ad42317d7057b170f8f9cb6898bb30e63a481 /core/fpdfapi/parser
parent37cc5fb6b3407ce8e079bc1bdd0606713b975532 (diff)
downloadpdfium-6088612c21898eb79cfbde401984176dd94c385c.tar.xz
RefCount CPDF_IccProfile all the time
Make the IccProfile track its stream so that it has a proper key with which to purge the docpagedata map. Change-Id: Ib05ebc1afb828f1f5e5df62a1a33a1bfdecf507d Reviewed-on: https://pdfium-review.googlesource.com/3619 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_document.cpp3
-rw-r--r--core/fpdfapi/parser/cpdf_document.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index b336acaf84..a2816d48a9 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -645,7 +645,8 @@ CPDF_Pattern* CPDF_Document::LoadPattern(CPDF_Object* pPatternObj,
return m_pDocPage->GetPattern(pPatternObj, bShading, matrix);
}
-CPDF_IccProfile* CPDF_Document::LoadIccProfile(CPDF_Stream* pStream) {
+CFX_RetainPtr<CPDF_IccProfile> CPDF_Document::LoadIccProfile(
+ CPDF_Stream* pStream) {
return m_pDocPage->GetIccProfile(pStream);
}
diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h
index 6f09e2230c..91cc2d7419 100644
--- a/core/fpdfapi/parser/cpdf_document.h
+++ b/core/fpdfapi/parser/cpdf_document.h
@@ -80,7 +80,7 @@ class CPDF_Document : public CPDF_IndirectObjectHolder {
CFX_RetainPtr<CPDF_Image> LoadImageFromPageData(uint32_t dwStreamObjNum);
CPDF_StreamAcc* LoadFontFile(CPDF_Stream* pStream);
- CPDF_IccProfile* LoadIccProfile(CPDF_Stream* pStream);
+ CFX_RetainPtr<CPDF_IccProfile> LoadIccProfile(CPDF_Stream* pStream);
void LoadDoc();
void LoadLinearizedDoc(const CPDF_LinearizedHeader* pLinearizationParams);