Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: fpdfsdk/src/javascript/JS_Runtime.cpp

Issue 1153553003: Make CPDFXFA_App / IXFA_AppProvider saner (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Address comments. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_mgr.cpp ('k') | fpdfsdk/src/javascript/global.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_Runtime.cpp
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index f3d7cf397218c5799d112a6ee3f7ec29750e6661..9450a6400a3c5d1eeb59a66a64298fbe3c81e8c1 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);
« no previous file with comments | « fpdfsdk/src/fsdk_mgr.cpp ('k') | fpdfsdk/src/javascript/global.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698