summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/cpdfsdk_environment.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-22 13:18:45 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-22 13:18:45 -0700
commita939bfe3e102bfb28b4e8a5d951333d16badf80b (patch)
treed9dc20fc9dbf6649a460f3aa10be7124b51caa7d /fpdfsdk/include/cpdfsdk_environment.h
parent62356867b331bc9f71f9a0c8fce0cff9927d3356 (diff)
downloadpdfium-a939bfe3e102bfb28b4e8a5d951333d16badf80b.tar.xz
Make creation of CPDFSDK_Document clearer
Move the creation of the CPDFSDK_Document into FPDFDOC_InitFormFillEnvironment instead of hidden inside a Get method in CDPFXFA_Document. Review-Url: https://codereview.chromium.org/2353303004
Diffstat (limited to 'fpdfsdk/include/cpdfsdk_environment.h')
-rw-r--r--fpdfsdk/include/cpdfsdk_environment.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fpdfsdk/include/cpdfsdk_environment.h b/fpdfsdk/include/cpdfsdk_environment.h
index 61916e46ad..b694359320 100644
--- a/fpdfsdk/include/cpdfsdk_environment.h
+++ b/fpdfsdk/include/cpdfsdk_environment.h
@@ -166,6 +166,9 @@ class CPDFSDK_Environment final {
std::unique_ptr<CPDFSDK_ActionHandler> m_pActionHandler;
std::unique_ptr<IJS_Runtime> m_pJSRuntime;
FPDF_FORMFILLINFO* const m_pInfo;
+ // Ownership of |m_pSDKDoc| depends on if this is XFA. If we're in XFA then
+ // the object is owned by the CPDFXFA_Document. In non-xfa then we own
+ // the pointer.
CPDFSDK_Document* m_pSDKDoc;
UnderlyingDocumentType* const m_pUnderlyingDoc;
std::unique_ptr<CFFL_InteractiveFormFiller> m_pFormFiller;