From 3962d80bde19074227c34f4615b0446f4975a098 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 20 Jun 2017 08:56:29 -0400 Subject: Cleanup tiling and shading patterns in correct order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a Shading is created we have both a ShadingPattern and a ShadingObject. The ShadingPattern is a ref-counted object that is stored in the CPDF_DocPageData. The ShadingObject, when we have a tiling pattern parent, is stored in the CPDF_Form of the tiling pattern. Currently during destruction it is possible for the ShadingPattern to get cleaned up before the ShadingObject which causes the UnownedPtr probe to fire. This CL loops over all patterns and for each Tiling pattern forces the CPDF_Form to get cleared. This then removes the ShadingObject before we remove the ShadingPattern. Bug: chromium:728992 Change-Id: Ife65607aa97f69440b03028981b5575b1e297093 Reviewed-on: https://pdfium-review.googlesource.com/6651 Commit-Queue: dsinclair Reviewed-by: Lei Zhang Reviewed-by: Nicolás Peña --- core/fpdfapi/page/cpdf_shadingobject.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'core/fpdfapi/page/cpdf_shadingobject.cpp') diff --git a/core/fpdfapi/page/cpdf_shadingobject.cpp b/core/fpdfapi/page/cpdf_shadingobject.cpp index 5454380cae..8a61161f17 100644 --- a/core/fpdfapi/page/cpdf_shadingobject.cpp +++ b/core/fpdfapi/page/cpdf_shadingobject.cpp @@ -6,7 +6,6 @@ #include "core/fpdfapi/page/cpdf_shadingobject.h" -#include "core/fpdfapi/page/cpdf_docpagedata.h" #include "core/fpdfapi/page/cpdf_shadingpattern.h" #include "core/fpdfapi/parser/cpdf_document.h" -- cgit v1.2.3