summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.h2
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp12
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h6
3 files changed, 11 insertions, 9 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
index e1c357fde9..9a2a517fb5 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
@@ -17,8 +17,8 @@ class CJS_Runtime;
class CPDFSDK_FormFillEnvironment;
class CPDFXFA_Page;
class CXFA_FFDocHandler;
+class IJS_EventContext;
class IJS_Runtime;
-class IJS_Context;
enum LoadStatus {
FXFA_LOADSTATUS_PRELOAD = 0,
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index ec62927324..962dbbae09 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -38,13 +38,15 @@
#define FXFA_XFA_ALL 0x01111111
CPDFXFA_DocEnvironment::CPDFXFA_DocEnvironment(CPDFXFA_Context* pContext)
- : m_pContext(pContext), m_pJSContext(nullptr) {
+ : m_pContext(pContext), m_pJSEventContext(nullptr) {
ASSERT(m_pContext);
}
CPDFXFA_DocEnvironment::~CPDFXFA_DocEnvironment() {
- if (m_pJSContext && m_pContext->GetFormFillEnv())
- m_pContext->GetFormFillEnv()->GetJSRuntime()->ReleaseContext(m_pJSContext);
+ if (m_pJSEventContext && m_pContext->GetFormFillEnv()) {
+ m_pContext->GetFormFillEnv()->GetJSRuntime()->ReleaseEventContext(
+ m_pJSEventContext);
+ }
}
void CPDFXFA_DocEnvironment::SetChangeMark(CXFA_FFDoc* hDoc) {
@@ -1023,8 +1025,8 @@ bool CPDFXFA_DocEnvironment::GetGlobalProperty(
}
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
- if (!m_pJSContext)
- m_pJSContext = pFormFillEnv->GetJSRuntime()->NewContext();
+ if (!m_pJSEventContext)
+ m_pJSEventContext = pFormFillEnv->GetJSRuntime()->NewEventContext();
return pFormFillEnv->GetJSRuntime()->GetValueByName(szPropName, pValue);
}
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
index d7cb169616..dc18d9a0c6 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
@@ -12,7 +12,7 @@
#include "xfa/fxfa/fxfa.h"
class CPDFXFA_Context;
-class IJS_Context;
+class IJS_EventContext;
class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment {
public:
@@ -107,8 +107,8 @@ class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment {
FPDF_DWORD flag);
void ToXFAContentFlags(CFX_WideString csSrcContent, FPDF_DWORD& flag);
- CPDFXFA_Context* const m_pContext; // Not owned;
- IJS_Context* m_pJSContext;
+ CPDFXFA_Context* const m_pContext; // Not owned.
+ IJS_EventContext* m_pJSEventContext; // Not owned.
};
#endif // FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_