summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-16 15:40:23 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-16 23:11:57 +0000
commit365333552cf67b7c97c4093177e7ed7b43f540ab (patch)
tree44dfc8a496ff586def85d34e0a07893445b79cc7 /xfa/fwl
parentdde95d8be9bc2817e34429fc38ee6d89d6d5ab75 (diff)
downloadpdfium-365333552cf67b7c97c4093177e7ed7b43f540ab.tar.xz
CFDE_RenderDevice::m_bOwnerDevice is always false
So remove it. But they probably wanted it to be true in one place, because it looks like a leak. So find a better way to own the object. Change-Id: I15937e29da5ce8b380f82cb20ee3ecc3f49b8ca3 Reviewed-on: https://pdfium-review.googlesource.com/5473 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_edit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 8c03402f23..28948cca21 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -566,9 +566,10 @@ void CFWL_Edit::DrawContent(CFX_Graphics* pGraphics,
if (!pRenderDev)
return;
- auto pRenderDevice = pdfium::MakeUnique<CFDE_RenderDevice>(pRenderDev, false);
- auto pRenderContext = pdfium::MakeUnique<CFDE_RenderContext>();
+ auto pRenderDevice = pdfium::MakeUnique<CFDE_RenderDevice>(pRenderDev);
pRenderDevice->SetClipRect(rtClip);
+
+ auto pRenderContext = pdfium::MakeUnique<CFDE_RenderContext>();
pRenderContext->StartRender(pRenderDevice.get(), pPage, mt);
pRenderContext->DoRender();