Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h

Issue 928803002: Set the view pointer as NULL after its xfa doc is released (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index fadded858fc1035dbeecf10675ca38c6f2a7d275..317200c2fa68ba34e108e0118c0049159b35765b 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) {
Tom Sepez 2015/02/17 20:37:24 nit: I'd put the implementation into the .cpp file
+ 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;
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698