From 258909cda89cb478ed44d56ca3e88d86f9dd4733 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 23 May 2017 14:31:00 -0700 Subject: Make CPDF_ImageCacheEntry retain CPDF_Image CPDF_PageRenderCache::m_ImageCache is a map from streams to an image cache entry containing a clump of data associated with the stream. Oddly, the clump includes the stream key (which we already have in order to get to the clump), but worse doesn't ensure the existence of the CPDF_Image object which (maybe) owns the stream key in question. So replace the stream with a retained ptr to the image. Also renamed an unrelated member to avoid confusion with the CPDF_Object in play. Bug: 724460 Change-Id: Id13d2c246918d4ff78c12b5bdb927f99c3f5e4e1 Reviewed-on: https://pdfium-review.googlesource.com/5771 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- core/fpdfapi/render/cpdf_imageloader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfapi/render/cpdf_imageloader.h') diff --git a/core/fpdfapi/render/cpdf_imageloader.h b/core/fpdfapi/render/cpdf_imageloader.h index d7c6f60fcc..f17f29cce5 100644 --- a/core/fpdfapi/render/cpdf_imageloader.h +++ b/core/fpdfapi/render/cpdf_imageloader.h @@ -38,7 +38,7 @@ class CPDF_ImageLoader { void HandleFailure(); CPDF_PageRenderCache* m_pCache; - CPDF_ImageObject* m_pImage; + CPDF_ImageObject* m_pImageObject; }; #endif // CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_ -- cgit v1.2.3