summaryrefslogtreecommitdiff
path: root/fpdfsdk/src
diff options
context:
space:
mode:
authorJochen Eisinger <jochen@chromium.org>2014-07-17 08:46:45 +0200
committerJochen Eisinger <jochen@chromium.org>2014-07-17 08:46:45 +0200
commit3fb18f41076a111e48cd8cdaee596075c89c275c (patch)
treeb9522eaaa1779a3632a13cda3912ade871b34cb8 /fpdfsdk/src
parent8f75c67f4e724ba44eb3d90e4033f8cc90522273 (diff)
downloadpdfium-3fb18f41076a111e48cd8cdaee596075c89c275c.tar.xz
Hook up the default v8::Platform implementation to pdfium
It remains to call the PumpMessageLoop() method at a regular interval, however, since nothing posts to the loop yet, that shouldn't be a problem. BUG=25 R=jam@chromium.org Review URL: https://codereview.chromium.org/374123002
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index c7a92ebde2..543540bd4d 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -27,6 +27,8 @@
#include "../../include/javascript/global.h"
#include "../../include/javascript/console.h"
+#include <libplatform/libplatform.h>
+
CJS_RuntimeFactory::~CJS_RuntimeFactory()
{
}
@@ -36,6 +38,8 @@ IFXJS_Runtime* CJS_RuntimeFactory::NewJSRuntime(CPDFDoc_Environment* pApp)
if (!m_bInit)
{
JS_Initial();
+ m_platform = v8::platform::CreateDefaultPlatform();
+ v8::V8::InitializePlatform(m_platform);
m_bInit = TRUE;
}
@@ -55,6 +59,9 @@ void CJS_RuntimeFactory::Release()
{
JS_Release();
ReleaseGlobalData();
+ v8::V8::ShutdownPlatform();
+ delete m_platform;
+ m_platform = NULL;
m_bInit = FALSE;
}
}