From 7d4f6a89d7e2c5d13b7d630d6348950044a5465e Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 31 Mar 2017 17:10:34 -0700 Subject: Refcount CPDF_Image all the time. Remove the old externally-counted CPDF_CountedImage type. Change-Id: Ia0b288586272da3f2daf7dfc153f08e62794321a Reviewed-on: https://pdfium-review.googlesource.com/3553 Reviewed-by: Lei Zhang Commit-Queue: Lei Zhang --- fpdfsdk/fpdfeditimg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp index ca78088793..4738bd1325 100644 --- a/fpdfsdk/fpdfeditimg.cpp +++ b/fpdfsdk/fpdfeditimg.cpp @@ -48,9 +48,9 @@ FPDFPageObj_NewImageObj(FPDF_DOCUMENT document) { if (!pDoc) return nullptr; - CPDF_ImageObject* pImageObj = new CPDF_ImageObject; - pImageObj->SetOwnedImage(pdfium::MakeUnique(pDoc)); - return pImageObj; + auto pImageObj = pdfium::MakeUnique(); + pImageObj->SetImage(pdfium::MakeRetain(pDoc)); + return pImageObj.release(); } DLLEXPORT FPDF_PAGEOBJECT STDCALL -- cgit v1.2.3