diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-09-22 08:36:17 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-09-22 08:36:17 -0700 |
commit | ed7b2b50aa1744e0bc5a60bef12c61fa91d863b7 (patch) | |
tree | 8661329f66b823af324441fb6accec98a8753cb8 /fpdfsdk/src/fpdfxfa | |
parent | 854a7f65b70d40225a53890a68a57f5c13cf268c (diff) | |
download | pdfium-ed7b2b50aa1744e0bc5a60bef12c61fa91d863b7.tar.xz |
XFA: contention between FXJSE and FXJS over isolate data slots
This probably broke at 06b60021e when the FXJS slot moved to 0
from 1 unless explicitly overriden by the embedder, which conflicted
with the FXJSE_ usage of slot 0.
Also simplify some logic used to track global intialization of the
underling JS.
TEST=run_javascript_tests.py on XFA branch doesn't segv.
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/1351173002 .
Diffstat (limited to 'fpdfsdk/src/fpdfxfa')
-rw-r--r-- | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp index dc5d0686fc..255d2bb024 100644 --- a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp +++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp @@ -28,7 +28,7 @@ void CPDFXFA_App::ReleaseInstance() { }
CPDFXFA_App::CPDFXFA_App()
- : m_bInitRuntime(FALSE),
+ : m_bJavaScriptInitialized(FALSE),
m_pXFAApp(NULL),
m_pFontMgr(NULL),
m_hJSERuntime(NULL),
@@ -70,18 +70,6 @@ FX_BOOL CPDFXFA_App::Initialize() { return TRUE;
}
-FX_BOOL CPDFXFA_App::InitRuntime(FX_BOOL bReset) {
- if (bReset) {
- m_bInitRuntime = FALSE;
- return TRUE;
- }
- if (m_bInitRuntime) {
- return TRUE;
- }
- m_bInitRuntime = TRUE;
- return FALSE;
-}
-
FX_BOOL CPDFXFA_App::AddFormFillEnv(CPDFDoc_Environment* pEnv) {
if (!pEnv)
return FALSE;
@@ -102,10 +90,6 @@ FX_BOOL CPDFXFA_App::RemoveFormFillEnv(CPDFDoc_Environment* pEnv) { return FALSE;
}
-void CPDFXFA_App::ReleaseRuntime() {
- v8::Global<v8::Context> context;
- FXJS_ReleaseRuntime((v8::Isolate*)m_hJSERuntime, context);
-}
void CPDFXFA_App::GetAppType(CFX_WideString& wsAppType) {
wsAppType = m_csAppType;
|