summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-18 13:22:57 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-18 13:22:58 -0700
commitf1a52caa6756049922a16203c9a0faee92cc07c3 (patch)
tree566c86df50374092435efaed4fe9c1cd39f26676 /xfa
parentcbfef5772c52fbd3378905a61fc9432da1515433 (diff)
downloadpdfium-f1a52caa6756049922a16203c9a0faee92cc07c3.tar.xz
Remove Release() from CXFA_ScriptContext
Review-Url: https://codereview.chromium.org/1988263002
Diffstat (limited to 'xfa')
-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; }