commit | 51d02661898ba339cae6562b061670d27b0d3501 | [log] [tgz] |
---|---|---|
author | Lei Zhang <thestig@chromium.org> | Thu Oct 31 18:28:51 2019 +0000 |
committer | Chromium commit bot <commit-bot@chromium.org> | Thu Oct 31 18:28:51 2019 +0000 |
tree | 31d64721061c1554f08cad678195d5fe3d1669b0 | |
parent | e397fef547557aae1a01aff2e37f3f33d45ae313 [diff] [blame] |
Make CPDFXFA_WidgetHandler::NewAnnotForXFA() return a std::unique_ptr. Fix its call stack to better indicate ownership, and remove impossible checks as well. Change-Id: If46cc6ef091139c32f8eaf00bb6f213b16b9b0fb Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/61671 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp index b077532..2a45b0d 100644 --- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp +++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
@@ -58,7 +58,7 @@ } #ifdef PDF_ENABLE_XFA -CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewXFAAnnot( +std::unique_ptr<CPDFSDK_Annot> CPDFSDK_AnnotHandlerMgr::NewXFAAnnot( CXFA_FFWidget* pAnnot, CPDFSDK_PageView* pPageView) { ASSERT(pAnnot);