diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-05-27 12:25:00 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-05-27 12:25:00 -0700 |
commit | bdeeb8a036442302b821686a03698b0bb98952e1 (patch) | |
tree | 2ef5fadc13ca977f4ed134d9e2074fade72282f9 /fpdfsdk/src/javascript/global.cpp | |
parent | 599851360cf036418a13ad246bf0334f46eabacb (diff) | |
download | pdfium-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/global.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/global.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp index daf5a85ffe..f139380b20 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(); } |