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

Unified Diff: fpdfsdk/src/javascript/global.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/javascript/JS_Runtime.cpp ('k') | xfa/include/fxfa/fxfa.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/global.cpp
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index daf5a85ffe5eb693a3f3a86a935d4f527bf5796d..f139380b20c944eeefd26c861f6cf88ddad8be2b 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -119,22 +119,17 @@ global_alternate::global_alternate(CJS_Object* pJSObject)
global_alternate::~global_alternate(void)
{
ASSERT(m_pApp != NULL);
-
-// CommitGlobalPersisitentVariables();
DestroyGlobalPersisitentVariables();
- CJS_RuntimeFactory* pFactory = FPDFXFA_GetApp()->GetRuntimeFactory();
- ASSERT(pFactory);
-
+ CJS_RuntimeFactory* pFactory = CPDFXFA_App::GetInstance()->GetRuntimeFactory();
pFactory->ReleaseGlobalData();
}
-
+
void global_alternate::Initial(CPDFDoc_Environment* pApp)
{
m_pApp = pApp;
- CJS_RuntimeFactory* pFactory = FPDFXFA_GetApp()->GetRuntimeFactory();
- ASSERT(pFactory);
+ CJS_RuntimeFactory* pFactory = CPDFXFA_App::GetInstance()->GetRuntimeFactory();
m_pGlobalData = pFactory->NewGlobalData(pApp);
UpdateGlobalPersistentVariables();
}
« no previous file with comments | « fpdfsdk/src/javascript/JS_Runtime.cpp ('k') | xfa/include/fxfa/fxfa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698