summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorJohn Abd-El-Malek <jam@chromium.org>2015-02-04 16:04:05 -0800
committerJohn Abd-El-Malek <jam@chromium.org>2015-02-04 16:04:05 -0800
commit1be20344622b3da0fa49d511254928c786154f6b (patch)
tree4067f7559a5b481c090df24e03db31f127222a3c /fpdfsdk
parent62120b79bbaca7430a8fc7ba0846b0a84f40542d (diff)
downloadpdfium-1be20344622b3da0fa49d511254928c786154f6b.tar.xz
Initialize V8 outside of PDFium.
This is similar to how we initialize ICU for V8 inside PDFium. BUG=455399 R=wfh@chromium.org Review URL: https://codereview.chromium.org/897973002
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/include/javascript/IJavaScript.h7
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp9
2 files changed, 1 insertions, 15 deletions
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index 8ea9a4e89f..9ae0329e30 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -7,10 +7,6 @@
#ifndef _IJAVASCRIPT_H_
#define _IJAVASCRIPT_H_
-namespace v8 {
-class Platform;
-}
-
class IFXJS_Context
{
public:
@@ -99,7 +95,7 @@ class CJS_GlobalData;
class CJS_RuntimeFactory
{
public:
- CJS_RuntimeFactory():m_bInit(FALSE),m_nRef(0),m_pGlobalData(NULL),m_nGlobalDataCount(0),m_platform(NULL) {}
+ CJS_RuntimeFactory():m_bInit(FALSE),m_nRef(0),m_pGlobalData(NULL),m_nGlobalDataCount(0) {}
~CJS_RuntimeFactory();
IFXJS_Runtime* NewJSRuntime(CPDFDoc_Environment* pApp);
void DeleteJSRuntime(IFXJS_Runtime* pRuntime);
@@ -113,7 +109,6 @@ private:
int m_nRef;
CJS_GlobalData* m_pGlobalData;
FX_INT32 m_nGlobalDataCount;
- v8::Platform* m_platform;
};
#endif //_IJAVASCRIPT_H_
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index 52e3ae813a..30d1cc3165 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -27,8 +27,6 @@
#include "../../include/javascript/global.h"
#include "../../include/javascript/console.h"
-#include <libplatform/libplatform.h>
-
CJS_RuntimeFactory::~CJS_RuntimeFactory()
{
}
@@ -38,10 +36,6 @@ IFXJS_Runtime* CJS_RuntimeFactory::NewJSRuntime(CPDFDoc_Environment* pApp)
if (!m_bInit)
{
JS_Initial();
- m_platform = v8::platform::CreateDefaultPlatform();
- v8::V8::InitializePlatform(m_platform);
- v8::V8::Initialize();
-
m_bInit = TRUE;
}
return new CJS_Runtime(pApp);
@@ -60,9 +54,6 @@ void CJS_RuntimeFactory::Release()
{
JS_Release();
ReleaseGlobalData();
- v8::V8::ShutdownPlatform();
- delete m_platform;
- m_platform = NULL;
m_bInit = FALSE;
}
}