summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fpdfxfa
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2015-02-17 04:52:09 -0800
committerJun Fang <jun_fang@foxitsoftware.com>2015-02-17 04:52:09 -0800
commit54d8c39002a0f8e3925de888226d22f157987a34 (patch)
tree1d601850dd6828bd448caf01c264bcc81b120ac7 /fpdfsdk/include/fpdfxfa
parentb7cb36aba7d32c506ee921cb7558b8effd4b2fa1 (diff)
downloadpdfium-54d8c39002a0f8e3925de888226d22f157987a34.tar.xz
Set the view pointer as NULL after its xfa doc is released
BUG=452794 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/928803002
Diffstat (limited to 'fpdfsdk/include/fpdfxfa')
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index fadded858f..317200c2fa 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
@@ -14,6 +14,7 @@ class CPDFSDK_Document;
class CPDFDoc_Environment;
class IFXJS_Runtime;
class IFXJS_Context;
+class IXFA_DocHandler;
class CPDFXFA_Document : public IXFA_DocProvider, public CFX_Object
{
@@ -22,7 +23,6 @@ public:
~CPDFXFA_Document();
FX_BOOL LoadXFADoc();
- void CloseXFADoc();
CPDFXFA_App* GetApp() {return m_pApp;}
CPDF_Document* GetPDFDoc() { return m_pPDFDoc; }
XFA_HDOC GetXFADoc() { return m_pXFADoc; }
@@ -128,6 +128,15 @@ public:
void _ClearChangeMark();
private:
+ void CloseXFADoc(IXFA_DocHandler* pDoc) {
+ if (pDoc) {
+ pDoc->CloseDoc(m_pXFADoc);
+ pDoc->ReleaseDoc(m_pXFADoc);
+ m_pXFADoc = NULL;
+ m_pXFADocView = NULL;
+ }
+ }
+
CPDF_Document* m_pPDFDoc;
XFA_HDOC m_pXFADoc;
IXFA_DocView* m_pXFADocView;