diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-01-30 10:04:07 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-30 18:46:09 +0000 |
commit | f716f0bd85cabfa02cea1d092890a0dea67ef0e3 (patch) | |
tree | 78c46e5ce93774bdb8ef3de2e3475acd9ecb44bd /fpdfsdk/fpdfview.cpp | |
parent | 4ada364e183e05479bc45d2ce41700ae18b7f6a3 (diff) | |
download | pdfium-f716f0bd85cabfa02cea1d092890a0dea67ef0e3.tar.xz |
Refcount CPDF_OCContext.
Avoids explicit deletes through CPDF_RenderOptions holding pointers
to it which may have been copy constructed. Ick.
Change-Id: Ic044b66d13bd7c5eaa53de995373858081e115ec
Reviewed-on: https://pdfium-review.googlesource.com/2451
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r-- | fpdfsdk/fpdfview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index ff4d46e357..c1dc0df73e 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -94,7 +94,7 @@ void RenderPageImpl(CPDF_PageRenderContext* pContext, (flags & FPDF_PRINTING) ? CPDF_OCContext::Print : CPDF_OCContext::View; pContext->m_pOptions->m_AddFlags = flags >> 8; pContext->m_pOptions->m_pOCContext = - new CPDF_OCContext(pPage->m_pDocument, usage); + pdfium::MakeRetain<CPDF_OCContext>(pPage->m_pDocument, usage); pContext->m_pDevice->SaveState(); pContext->m_pDevice->SetClip_Rect(clipping_rect); |