diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-09-21 17:07:49 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-09-21 17:07:49 -0700 |
commit | 854a7f65b70d40225a53890a68a57f5c13cf268c (patch) | |
tree | 8b4492eae70a53cf9a6d1e46e385120c319a9cb0 /fpdfsdk/src/fsdk_mgr.cpp | |
parent | 116e4addeecd2cb779b1ab590bea2d091ca12915 (diff) | |
download | pdfium-854a7f65b70d40225a53890a68a57f5c13cf268c.tar.xz |
Merge to XFA: Remove CJS_RuntimeFactory
New edits in:
fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
fpdfsdk/include/javascript/IJavaScript.h
fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
(cherry picked from commit bca779d0957965eb2ebfad5479e0894844749626)
Original Review URL: https://codereview.chromium.org/1360523004 .
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1348393007 .
Diffstat (limited to 'fpdfsdk/src/fsdk_mgr.cpp')
-rw-r--r-- | fpdfsdk/src/fsdk_mgr.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp index 4a55622e57..a3e77e4514 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -13,6 +13,7 @@ #include "../include/formfiller/FFL_FormFiller.h" #include "../include/javascript/IJavaScript.h" #include "../include/fpdfxfa/fpdfxfa_app.h" +#include "../include/javascript/JS_Runtime.h" #if _FX_OS_ == _FX_ANDROID_ #include "time.h" @@ -209,7 +210,6 @@ CPDFDoc_Environment::CPDFDoc_Environment(CPDFXFA_Document* pDoc, FPDF_FORMFILLINFO* pFFinfo) : m_pAnnotHandlerMgr(NULL), m_pActionHandler(NULL), - m_pJSRuntime(NULL), m_pInfo(pFFinfo), m_pSDKDoc(NULL), m_pXFADoc(pDoc), @@ -222,9 +222,6 @@ CPDFDoc_Environment::~CPDFDoc_Environment() { m_pIFormFiller = NULL; CPDFXFA_App* pProvider = CPDFXFA_App::GetInstance(); - if (m_pJSRuntime && pProvider->GetRuntimeFactory()) - pProvider->GetRuntimeFactory()->DeleteJSRuntime(m_pJSRuntime); - if (pProvider->m_pEnvList.GetSize() == 0) { pProvider->ReleaseRuntime(); pProvider->InitRuntime(TRUE); @@ -386,9 +383,8 @@ IFXJS_Runtime* CPDFDoc_Environment::GetJSRuntime() { if (!IsJSInitiated()) return NULL; if (!m_pJSRuntime) - m_pJSRuntime = - CPDFXFA_App::GetInstance()->GetRuntimeFactory()->NewJSRuntime(this); - return m_pJSRuntime; + m_pJSRuntime.reset(new CJS_Runtime(this)); + return m_pJSRuntime.get(); } CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() { |