summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xfa/fxfa/parser/xfa_document_imp.cpp7
-rw-r--r--xfa/fxfa/parser/xfa_script_imp.cpp3
-rw-r--r--xfa/fxfa/parser/xfa_script_imp.h1
3 files changed, 2 insertions, 9 deletions
diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp
index c6f9295dcc..4d13f16f0e 100644
--- a/xfa/fxfa/parser/xfa_document_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_imp.cpp
@@ -49,11 +49,8 @@ CXFA_Document::~CXFA_Document() {
void CXFA_Document::ClearLayoutData() {
delete m_pLayoutProcessor;
m_pLayoutProcessor = nullptr;
-
- if (m_pScriptContext) {
- m_pScriptContext->Release();
- m_pScriptContext = nullptr;
- }
+ delete m_pScriptContext;
+ m_pScriptContext = nullptr;
delete m_pLocalMgr;
m_pLocalMgr = nullptr;
delete m_pScriptDataWindow;
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index b218121165..7bd6aaa40c 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -64,9 +64,6 @@ void CXFA_ScriptContext::Initialize(FXJSE_HRUNTIME hRuntime) {
DefineJsClass();
m_pResolveProcessor = new CXFA_ResolveProcessor;
}
-void CXFA_ScriptContext::Release() {
- delete this;
-}
FX_BOOL CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
const CFX_WideStringC& wsScript,
FXJSE_HVALUE hRetValue,
diff --git a/xfa/fxfa/parser/xfa_script_imp.h b/xfa/fxfa/parser/xfa_script_imp.h
index 1ff8f76745..322b64bef6 100644
--- a/xfa/fxfa/parser/xfa_script_imp.h
+++ b/xfa/fxfa/parser/xfa_script_imp.h
@@ -23,7 +23,6 @@ class CXFA_ScriptContext {
explicit CXFA_ScriptContext(CXFA_Document* pDocument);
~CXFA_ScriptContext();
- void Release();
void Initialize(FXJSE_HRUNTIME hRuntime);
void SetEventParam(CXFA_EventParam param) { m_eventParam = param; }
CXFA_EventParam* GetEventParam() { return &m_eventParam; }