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

Unified Diff: fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp

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
Index: fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
index d8c08cc2a5c549ffeb6a2ec7fd996c920d348fd1..f13870697bf9ddd8a0d4ab339a20f47c9aa9e250 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
@@ -13,19 +13,6 @@
#include "../../include/fpdfxfa/fpdfxfa_page.h"
#include "../../include/javascript/IJavaScript.h"
-
-
-#define IDS_XFA_StringMonth_April "April"
-#define IDS_XFA_StringMonth_May "May"
-#define IDS_XFA_StringMonth_June "June"
-#define IDS_XFA_StringMonth_July "July"
-#define IDS_XFA_StringMonth_Aug "August"
-#define IDS_XFA_StringMonth_Sept "September"
-#define IDS_XFA_StringMonth_Oct "October"
-#define IDS_XFA_StringMonth_Nov "November"
-#define IDS_XFA_StringMonth_Dec "December"
-#define IDS_XFA_String_Today "Today"
-#define IDS_XFA_ValidateLimit "Message limit exceeded. Remaining %d validation errors not reported."
#define IDS_XFA_Validate_Input "At least one required field was empty. Please fill in the required fields\r\n(highlighted) before continuing."
// submit
@@ -78,9 +65,7 @@ CPDFXFA_Document::~CPDFXFA_Document()
IXFA_DocHandler* pDocHandler = pApp->GetDocHandler();
if (pDocHandler)
{
- pDocHandler->CloseDoc(m_pXFADoc);
- pDocHandler->ReleaseDoc(m_pXFADoc);
- m_pXFADoc = NULL;
+ CloseXFADoc(pDocHandler);
}
}
}
@@ -129,10 +114,7 @@ FX_BOOL CPDFXFA_Document::LoadXFADoc()
iStatus = pDocHandler->DoLoad(m_pXFADoc, NULL);
if (iStatus != 100)
{
- pDocHandler->CloseDoc(m_pXFADoc);
- pDocHandler->ReleaseDoc(m_pXFADoc);
- m_pXFADoc = NULL;
-
+ CloseXFADoc(pDocHandler);
SetLastError(FPDF_ERR_XFALOAD);
return FALSE;
}
@@ -149,10 +131,7 @@ FX_BOOL CPDFXFA_Document::LoadXFADoc()
if (m_pXFADocView->StartLayout() < 0)
{
- pDocHandler->CloseDoc(m_pXFADoc);
- pDocHandler->ReleaseDoc(m_pXFADoc);
- m_pXFADoc = NULL;
-
+ CloseXFADoc(pDocHandler);
SetLastError(FPDF_ERR_XFALAYOUT);
return FALSE;
}
« fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h ('K') | « fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698