summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Runtime.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-27 12:25:00 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-27 12:25:00 -0700
commitbdeeb8a036442302b821686a03698b0bb98952e1 (patch)
tree2ef5fadc13ca977f4ed134d9e2074fade72282f9 /fpdfsdk/src/javascript/JS_Runtime.cpp
parent599851360cf036418a13ad246bf0334f46eabacb (diff)
downloadpdfium-bdeeb8a036442302b821686a03698b0bb98952e1.tar.xz
Make CPDFXFA_App / IXFA_AppProvider saner
Move interface comments from the implementation header to the interface header. Replace Create / Release functions with static methods. Replace dubious Release() methods with deletion via virtual dtor, also for IXFA_App and IXFA_FontMgr while we're at it. Untabify and fix (theoretically) illegal _CAP include guard definitions for fpdfxfa/ headers. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1153553003
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Runtime.cpp')
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index f3d7cf3972..9450a6400a 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -114,8 +114,8 @@ CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp) :
m_bRegistered(FALSE),
m_pFieldEventPath(NULL)
{
- if (FPDFXFA_GetApp()->GetJSERuntime()) {
- m_isolate = (v8::Isolate*)FPDFXFA_GetApp()->GetJSERuntime();
+ if (CPDFXFA_App::GetInstance()->GetJSERuntime()) {
+ m_isolate = (v8::Isolate*)CPDFXFA_App::GetInstance()->GetJSERuntime();
} else {
m_pArrayBufferAllocator.reset(new CJS_ArrayBufferAllocator());
v8::Isolate::CreateParams params;
@@ -127,7 +127,7 @@ CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp) :
v8::Isolate::Scope isolate_scope(isolate);
v8::Locker locker(isolate);
v8::HandleScope handle_scope(isolate);
- if (FPDFXFA_GetApp()->InitRuntime(FALSE)) {
+ if (CPDFXFA_App::GetInstance()->InitRuntime(FALSE)) {
CJS_Context * pContext = (CJS_Context*)NewContext();
JS_InitialRuntime(*this, this, pContext, m_context);
ReleaseContext(pContext);