summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-18 12:32:20 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-18 20:16:06 +0000
commit940967de0b588d3abb9cba5822ae5f5c5fe05017 (patch)
tree6c34432c66d716918efd1917075076dbd870084a /fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
parent690d456ad54f021063dcc17fde27c7ba4d910717 (diff)
downloadpdfium-940967de0b588d3abb9cba5822ae5f5c5fe05017.tar.xz
Use Unowned/Observed pointers between doc and FF onwership hierarchies.
See the explanation in CPDFSDK_FormFillEnvironment.h Change-Id: I52feb25fb358831233a636e3ead5aa70e98c5baa Reviewed-on: https://pdfium-review.googlesource.com/5658 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_context.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
index 1345bc8a08..1032d49edc 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
@@ -58,7 +58,7 @@ CPDFXFA_Context::~CPDFXFA_Context() {
// Once we're deleted the FormFillEnvironment will point at a bad underlying
// doc so we need to reset it ...
m_pFormFillEnv->ResetXFADocument();
- m_pFormFillEnv = nullptr;
+ m_pFormFillEnv.Reset();
}
m_nLoadStatus = FXFA_LOADSTATUS_CLOSED;
@@ -81,7 +81,7 @@ void CPDFXFA_Context::SetFormFillEnv(
if (m_pXFADoc && m_pXFADoc->GetXFADoc())
m_pXFADoc->GetXFADoc()->ClearLayoutData();
- m_pFormFillEnv = pFormFillEnv;
+ m_pFormFillEnv.Reset(pFormFillEnv);
}
bool CPDFXFA_Context::LoadXFADoc() {