summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-25 16:42:05 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-25 16:42:05 -0700
commitec3da5b821ed65c53eff1c78c2493afd7d933371 (patch)
treecc4b5f00aaf2f79344a115d57fdda99621d4e817 /fpdfsdk/fpdfxfa
parentcece6534e4e4ac10fdcfb47ac1d690e91bf63c19 (diff)
downloadpdfium-ec3da5b821ed65c53eff1c78c2493afd7d933371.tar.xz
Rename FXJSE_HRUNTIME to v8::Isolate
This CL renames all of the instances of FXJSE_HRUNTIME to be v8::Isolate* and updates the various varible names to match the new type. Review-Url: https://codereview.chromium.org/2010833002
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_app.cpp14
-rw-r--r--fpdfsdk/fpdfxfa/include/fpdfxfa_app.h6
2 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
index e91bdf1699..16efc0a1de 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
@@ -31,7 +31,7 @@ void CPDFXFA_App::ReleaseInstance() {
CPDFXFA_App::CPDFXFA_App()
: m_bJavaScriptInitialized(FALSE),
m_pXFAApp(NULL),
- m_hJSERuntime(NULL),
+ m_pIsolate(nullptr),
m_csAppType(JS_STR_VIEWERTYPE_STANDARD),
m_bOwnedRuntime(false) {
m_pEnvList.RemoveAll();
@@ -42,22 +42,22 @@ CPDFXFA_App::~CPDFXFA_App() {
m_pXFAApp = NULL;
#ifdef PDF_ENABLE_XFA
- FXJSE_Runtime_Release(m_hJSERuntime, m_bOwnedRuntime);
- m_hJSERuntime = NULL;
+ FXJSE_Runtime_Release(m_pIsolate, m_bOwnedRuntime);
+ m_pIsolate = nullptr;
FXJSE_Finalize();
BC_Library_Destory();
#endif
}
-FX_BOOL CPDFXFA_App::Initialize(FXJSE_HRUNTIME hRuntime) {
+FX_BOOL CPDFXFA_App::Initialize(v8::Isolate* pIsolate) {
#ifdef PDF_ENABLE_XFA
BC_Library_Init();
FXJSE_Initialize();
- m_bOwnedRuntime = !hRuntime;
- m_hJSERuntime = hRuntime ? hRuntime : FXJSE_Runtime_Create();
- if (!m_hJSERuntime)
+ m_bOwnedRuntime = !pIsolate;
+ m_pIsolate = pIsolate ? pIsolate : FXJSE_Runtime_Create();
+ if (!m_pIsolate)
return FALSE;
m_pXFAApp = new CXFA_FFApp(this);
diff --git a/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h b/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h
index 3a61ef40c3..b561245dcd 100644
--- a/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h
+++ b/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h
@@ -20,7 +20,7 @@ class CPDFXFA_App : public IXFA_AppProvider {
CPDFXFA_App();
~CPDFXFA_App() override;
- FX_BOOL Initialize(FXJSE_HRUNTIME hRuntime);
+ FX_BOOL Initialize(v8::Isolate* pIsolate);
CXFA_FFApp* GetXFAApp() { return m_pXFAApp; }
FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv);
@@ -31,7 +31,7 @@ class CPDFXFA_App : public IXFA_AppProvider {
m_bJavaScriptInitialized = bInitialized;
}
- FXJSE_HRUNTIME GetJSERuntime() const { return m_hJSERuntime; }
+ v8::Isolate* GetJSERuntime() const { return m_pIsolate; }
// IFXA_AppProvider:
void GetAppType(CFX_WideString& wsAppType) override;
@@ -84,7 +84,7 @@ class CPDFXFA_App : public IXFA_AppProvider {
FX_BOOL m_bJavaScriptInitialized;
CXFA_FFApp* m_pXFAApp;
- FXJSE_HRUNTIME m_hJSERuntime;
+ v8::Isolate* m_pIsolate;
IFXJS_Runtime* m_pJSRuntime;
CFX_WideString m_csAppType;
bool m_bOwnedRuntime;