summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_helpers.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-31 23:38:32 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-31 23:38:32 +0000
commit2d11d72e326140b9abeb6de2db1e28e5bf9d7e64 (patch)
treeffd41a61a342924bded55443d6a478b3f8caee0f /fpdfsdk/cpdfsdk_helpers.cpp
parent73659ee409ae4840c5019633a5c4000eececd7c0 (diff)
downloadpdfium-2d11d72e326140b9abeb6de2db1e28e5bf9d7e64.tar.xz
Make CPDF_Document own its Extension.
Inverting the ownership from the current situation makes cleanup much more intuitive. Change-Id: Iad9a7ca70c0746170ba753297732e3e34f96c5ba Reviewed-on: https://pdfium-review.googlesource.com/33190 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_helpers.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_helpers.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/cpdfsdk_helpers.cpp b/fpdfsdk/cpdfsdk_helpers.cpp
index c6861bc05a..210fcf8b84 100644
--- a/fpdfsdk/cpdfsdk_helpers.cpp
+++ b/fpdfsdk/cpdfsdk_helpers.cpp
@@ -158,7 +158,7 @@ CPDF_Document* CPDFDocumentFromFPDFDocument(FPDF_DOCUMENT doc) {
FPDF_DOCUMENT FPDFDocumentFromCPDFDocument(CPDF_Document* doc) {
#ifdef PDF_ENABLE_XFA
if (doc && !doc->GetExtension())
- doc->SetExtension(new CPDFXFA_Context(pdfium::WrapUnique(doc)));
+ doc->SetExtension(pdfium::MakeUnique<CPDFXFA_Context>(doc));
#endif // PDF_ENABLE_XFA
return reinterpret_cast<FPDF_DOCUMENT>(doc);
}