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

Unified Diff: fpdfsdk/fpdfxfa/fpdfxfa_app.cpp

Issue 2025193002: Track shared isolates better in FXJSE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 4 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 | « no previous file | fpdfsdk/fpdfxfa/include/fpdfxfa_app.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
index f7a6a3ba001dd7a6a9cb00e904d810c65f77d4ae..56dfd47b29aacd3633c5077ad022b4aa53b17d5d 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
@@ -32,8 +32,7 @@ CPDFXFA_App::CPDFXFA_App()
: m_bJavaScriptInitialized(FALSE),
m_pXFAApp(NULL),
m_pIsolate(nullptr),
- m_csAppType(JS_STR_VIEWERTYPE_STANDARD),
- m_bOwnedRuntime(false) {
+ m_csAppType(JS_STR_VIEWERTYPE_STANDARD) {
m_pEnvList.RemoveAll();
}
@@ -41,29 +40,25 @@ CPDFXFA_App::~CPDFXFA_App() {
delete m_pXFAApp;
m_pXFAApp = NULL;
-#ifdef PDF_ENABLE_XFA
- FXJSE_Runtime_Release(m_pIsolate, m_bOwnedRuntime);
+ FXJSE_Runtime_Release(m_pIsolate);
m_pIsolate = nullptr;
FXJSE_Finalize();
BC_Library_Destory();
-#endif
}
FX_BOOL CPDFXFA_App::Initialize(v8::Isolate* pIsolate) {
-#ifdef PDF_ENABLE_XFA
BC_Library_Init();
FXJSE_Initialize();
- m_bOwnedRuntime = !pIsolate;
- m_pIsolate = pIsolate ? pIsolate : FXJSE_Runtime_Create();
+ m_pIsolate = pIsolate ? pIsolate : FXJSE_Runtime_Create_Own();
if (!m_pIsolate)
return FALSE;
m_pXFAApp = new CXFA_FFApp(this);
m_pXFAApp->SetDefaultFontMgr(
std::unique_ptr<CXFA_DefFontMgr>(new CXFA_DefFontMgr));
-#endif
+
return TRUE;
}
« no previous file with comments | « no previous file | fpdfsdk/fpdfxfa/include/fpdfxfa_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698