summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp12
1 files changed, 7 insertions, 5 deletions
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);
}