From bca779d0957965eb2ebfad5479e0894844749626 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 21 Sep 2015 16:29:20 -0700 Subject: Remove CJS_RuntimeFactory The Factory Design Pattern isn't buying us anything here over just new'ing the object we want. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1360523004 . --- fpdfsdk/src/javascript/JS_Runtime.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'fpdfsdk/src/javascript') diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp index edc8c253d9..43a4dcd3ff 100644 --- a/fpdfsdk/src/javascript/JS_Runtime.cpp +++ b/fpdfsdk/src/javascript/JS_Runtime.cpp @@ -27,28 +27,6 @@ #include "../../include/javascript/global.h" #include "../../include/javascript/console.h" -CJS_RuntimeFactory::~CJS_RuntimeFactory() {} - -IFXJS_Runtime* CJS_RuntimeFactory::NewJSRuntime(CPDFDoc_Environment* pApp) { - m_bInit = true; - return new CJS_Runtime(pApp); -} -void CJS_RuntimeFactory::AddRef() { - m_nRef++; -} -void CJS_RuntimeFactory::Release() { - if (m_bInit) { - if (--m_nRef == 0) { - FXJS_Release(); - m_bInit = FALSE; - } - } -} - -void CJS_RuntimeFactory::DeleteJSRuntime(IFXJS_Runtime* pRuntime) { - delete (CJS_Runtime*)pRuntime; -} - /* ------------------------------ CJS_Runtime ------------------------------ */ CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp) -- cgit v1.2.3