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/include/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/include/fpdfxfa')
-rw-r--r-- | fpdfsdk/include/fpdfxfa/fpdfxfa_app.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h index 49825c3f7f..f5052e3adf 100644 --- a/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h +++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_app.h @@ -23,9 +23,12 @@ class CPDFXFA_App : public IXFA_AppProvider { FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv);
FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv);
- FXJSE_HRUNTIME GetJSERuntime() { return m_hJSERuntime; }
- void ReleaseRuntime();
- FX_BOOL InitRuntime(FX_BOOL bReset = FALSE);
+ FX_BOOL IsJavaScriptInitialized() const { return m_bJavaScriptInitialized; }
+ void SetJavaScriptInitialized(FX_BOOL bInitialized) {
+ m_bJavaScriptInitialized = bInitialized;
+ }
+
+ FXJSE_HRUNTIME GetJSERuntime() const { return m_hJSERuntime; }
// IFXA_AppProvider:
void GetAppType(CFX_WideString& wsAppType) override;
@@ -81,7 +84,7 @@ class CPDFXFA_App : public IXFA_AppProvider { protected:
static CPDFXFA_App* g_pApp;
- FX_BOOL m_bInitRuntime;
+ FX_BOOL m_bJavaScriptInitialized;
IXFA_App* m_pXFAApp;
IXFA_FontMgr* m_pFontMgr;
FXJSE_HRUNTIME m_hJSERuntime;
|