summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Runtime.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-09-14 15:06:53 -0700
committerTom Sepez <tsepez@chromium.org>2015-09-14 15:06:53 -0700
commitf458362c167f29f37301f48b08eb8d916e69d40b (patch)
treed1d53eb4e1fddee030d7ccbc05e19c80765260c3 /fpdfsdk/src/javascript/JS_Runtime.cpp
parent142165e2f62b8ba727e8aab40591ca3a7b6fa214 (diff)
downloadpdfium-f458362c167f29f37301f48b08eb8d916e69d40b.tar.xz
Merge to XFA: Get CJS_RuntimeFactory out of CJS_GlobalData management.
(cherry picked from commit 9a817f092e6800e9338b41acf4ea0416b6ad4467) Original Review URL: https://codereview.chromium.org/1338993005 . Small manual merge in fpdfsdk/src/javascript/JS_GlobalData.cpp fpdfsdk/src/javascript/global.cpp TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1341913002 .
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Runtime.cpp')
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index 880fadebbc..afc6db6ae5 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -52,7 +52,6 @@ void CJS_RuntimeFactory::Release() {
// to do.Should be implemented as atom manipulation.
if (--m_nRef == 0) {
JS_Release();
- ReleaseGlobalData();
m_bInit = FALSE;
}
}
@@ -62,25 +61,6 @@ void CJS_RuntimeFactory::DeleteJSRuntime(IFXJS_Runtime* pRuntime) {
delete (CJS_Runtime*)pRuntime;
}
-CJS_GlobalData* CJS_RuntimeFactory::NewGlobalData(CPDFDoc_Environment* pApp) {
- if (m_pGlobalData) {
- m_nGlobalDataCount++;
- return m_pGlobalData;
- }
- m_nGlobalDataCount = 1;
- m_pGlobalData = new CJS_GlobalData(pApp);
- return m_pGlobalData;
-}
-
-void CJS_RuntimeFactory::ReleaseGlobalData() {
- m_nGlobalDataCount--;
-
- if (m_nGlobalDataCount <= 0) {
- delete m_pGlobalData;
- m_pGlobalData = NULL;
- }
-}
-
void* CJS_ArrayBufferAllocator::Allocate(size_t length) {
return calloc(1, length);
}