summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/cpdfsdk_annothandlermgr.cpp14
-rw-r--r--fpdfsdk/cpdfsdk_widgethandler.cpp6
-rw-r--r--fpdfsdk/cpdfsdk_xfawidgethandler.cpp6
-rw-r--r--fpdfsdk/include/cpdfsdk_annothandlermgr.h2
-rw-r--r--fpdfsdk/include/cpdfsdk_widgethandler.h2
-rw-r--r--fpdfsdk/include/cpdfsdk_xfawidgethandler.h2
-rw-r--r--fpdfsdk/javascript/Document.cpp4
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp6
-rw-r--r--fpdfsdk/javascript/app.cpp46
-rw-r--r--fpdfsdk/javascript/cjs_context.cpp4
-rw-r--r--fpdfsdk/javascript/cjs_context.h2
-rw-r--r--fpdfsdk/javascript/cjs_runtime.cpp8
-rw-r--r--fpdfsdk/javascript/cjs_runtime.h4
-rw-r--r--fpdfsdk/javascript/global.cpp10
-rw-r--r--fpdfsdk/javascript/global.h4
15 files changed, 60 insertions, 60 deletions
diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
index 5092dc731f..87fc8056c6 100644
--- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp
+++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
@@ -24,14 +24,14 @@
#include "xfa/fxfa/include/xfa_ffwidget.h"
#endif // PDF_ENABLE_XFA
-CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(CPDFSDK_Environment* pApp)
+CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(CPDFSDK_Environment* pEnv)
: m_pBAAnnotHandler(new CPDFSDK_BAAnnotHandler()),
- m_pWidgetHandler(new CPDFSDK_WidgetHandler(pApp)),
+ m_pWidgetHandler(new CPDFSDK_WidgetHandler(pEnv)),
#ifdef PDF_ENABLE_XFA
- m_pXFAWidgetHandler(new CPDFSDK_XFAWidgetHandler(pApp)),
+ m_pXFAWidgetHandler(new CPDFSDK_XFAWidgetHandler(pEnv)),
#endif // PDF_ENABLE_XFA
- m_pApp(pApp) {
- m_pWidgetHandler->SetFormFiller(m_pApp->GetInteractiveFormFiller());
+ m_pEnv(pEnv) {
+ m_pWidgetHandler->SetFormFiller(m_pEnv->GetInteractiveFormFiller());
}
CPDFSDK_AnnotHandlerMgr::~CPDFSDK_AnnotHandlerMgr() {}
@@ -193,14 +193,14 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot,
FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnKeyDown(CPDFSDK_Annot* pAnnot,
int nKeyCode,
int nFlag) {
- if (m_pApp->IsCTRLKeyDown(nFlag) || m_pApp->IsALTKeyDown(nFlag))
+ if (m_pEnv->IsCTRLKeyDown(nFlag) || m_pEnv->IsALTKeyDown(nFlag))
return GetAnnotHandler(pAnnot)->OnKeyDown(pAnnot, nKeyCode, nFlag);
CPDFSDK_PageView* pPage = pAnnot->GetPageView();
CPDFSDK_Annot* pFocusAnnot = pPage->GetFocusAnnot();
if (pFocusAnnot && (nKeyCode == FWL_VKEY_Tab)) {
CPDFSDK_Annot* pNext =
- GetNextAnnot(pFocusAnnot, !m_pApp->IsSHIFTKeyDown(nFlag));
+ GetNextAnnot(pFocusAnnot, !m_pEnv->IsSHIFTKeyDown(nFlag));
if (pNext && pNext != pFocusAnnot) {
CPDFSDK_Document* pDocument = pPage->GetSDKDocument();
diff --git a/fpdfsdk/cpdfsdk_widgethandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp
index 0a2694df89..3998cb4f8a 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -24,8 +24,8 @@
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
#endif // PDF_ENABLE_XFA
-CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(CPDFSDK_Environment* pApp)
- : m_pApp(pApp), m_pFormFiller(nullptr) {}
+CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(CPDFSDK_Environment* pEnv)
+ : m_pEnv(pEnv), m_pFormFiller(nullptr) {}
CPDFSDK_WidgetHandler::~CPDFSDK_WidgetHandler() {}
@@ -54,7 +54,7 @@ FX_BOOL CPDFSDK_WidgetHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
CPDFSDK_Annot* CPDFSDK_WidgetHandler::NewAnnot(CPDF_Annot* pAnnot,
CPDFSDK_PageView* pPage) {
- CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument();
+ CPDFSDK_Document* pSDKDoc = m_pEnv->GetSDKDocument();
CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm();
CPDF_FormControl* pCtrl = CPDFSDK_Widget::GetFormControl(
pInterForm->GetInterForm(), pAnnot->GetAnnotDict());
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
index 0f91ccc905..fc39473b04 100644
--- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
@@ -22,8 +22,8 @@
#include "xfa/fxfa/include/xfa_ffwidgethandler.h"
#include "xfa/fxgraphics/include/cfx_graphics.h"
-CPDFSDK_XFAWidgetHandler::CPDFSDK_XFAWidgetHandler(CPDFSDK_Environment* pApp)
- : m_pApp(pApp) {}
+CPDFSDK_XFAWidgetHandler::CPDFSDK_XFAWidgetHandler(CPDFSDK_Environment* pEnv)
+ : m_pEnv(pEnv) {}
CPDFSDK_XFAWidgetHandler::~CPDFSDK_XFAWidgetHandler() {}
@@ -38,7 +38,7 @@ CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CPDF_Annot* pAnnot,
CPDFSDK_Annot* CPDFSDK_XFAWidgetHandler::NewAnnot(CXFA_FFWidget* pAnnot,
CPDFSDK_PageView* pPage) {
- CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument();
+ CPDFSDK_Document* pSDKDoc = m_pEnv->GetSDKDocument();
CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm();
CPDFSDK_XFAWidget* pWidget = new CPDFSDK_XFAWidget(pAnnot, pPage, pInterForm);
pInterForm->AddXFAMap(pAnnot, pWidget);
diff --git a/fpdfsdk/include/cpdfsdk_annothandlermgr.h b/fpdfsdk/include/cpdfsdk_annothandlermgr.h
index d79fc067f6..350fb51e9d 100644
--- a/fpdfsdk/include/cpdfsdk_annothandlermgr.h
+++ b/fpdfsdk/include/cpdfsdk_annothandlermgr.h
@@ -118,7 +118,7 @@ class CPDFSDK_AnnotHandlerMgr {
std::unique_ptr<CPDFSDK_XFAWidgetHandler> m_pXFAWidgetHandler;
#endif // PDF_ENABLE_XFA
- CPDFSDK_Environment* m_pApp;
+ CPDFSDK_Environment* m_pEnv;
};
#endif // FPDFSDK_INCLUDE_CPDFSDK_ANNOTHANDLERMGR_H_
diff --git a/fpdfsdk/include/cpdfsdk_widgethandler.h b/fpdfsdk/include/cpdfsdk_widgethandler.h
index c5efd21e84..19f977eb95 100644
--- a/fpdfsdk/include/cpdfsdk_widgethandler.h
+++ b/fpdfsdk/include/cpdfsdk_widgethandler.h
@@ -109,7 +109,7 @@ class CPDFSDK_WidgetHandler : public IPDFSDK_AnnotHandler {
CFFL_InteractiveFormFiller* GetFormFiller() { return m_pFormFiller; }
private:
- CPDFSDK_Environment* m_pApp;
+ CPDFSDK_Environment* m_pEnv;
CFFL_InteractiveFormFiller* m_pFormFiller;
};
diff --git a/fpdfsdk/include/cpdfsdk_xfawidgethandler.h b/fpdfsdk/include/cpdfsdk_xfawidgethandler.h
index 9ad7784ef3..c18a36f8b6 100644
--- a/fpdfsdk/include/cpdfsdk_xfawidgethandler.h
+++ b/fpdfsdk/include/cpdfsdk_xfawidgethandler.h
@@ -100,7 +100,7 @@ class CPDFSDK_XFAWidgetHandler : public IPDFSDK_AnnotHandler {
CXFA_FFWidgetHandler* GetXFAWidgetHandler(CPDFSDK_Annot* pAnnot);
uint32_t GetFWLFlags(uint32_t dwFlag);
- CPDFSDK_Environment* m_pApp;
+ CPDFSDK_Environment* m_pEnv;
};
#endif // FPDFSDK_INCLUDE_CPDFSDK_XFAWIDGETHANDLER_H_
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 8935037ec8..ea225f095d 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -407,7 +407,7 @@ FX_BOOL Document::mailForm(IJS_Context* cc,
return FALSE;
pRuntime->BeginBlock();
- CPDFSDK_Environment* pEnv = pContext->GetReaderApp();
+ CPDFSDK_Environment* pEnv = pContext->GetReaderEnv();
pEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI,
cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(),
cMsg.c_str());
@@ -755,7 +755,7 @@ FX_BOOL Document::mailDoc(IJS_Context* cc,
}
pRuntime->BeginBlock();
- CPDFSDK_Environment* pEnv = pRuntime->GetReaderApp();
+ CPDFSDK_Environment* pEnv = pRuntime->GetReaderEnv();
pEnv->JS_docmailForm(nullptr, 0, bUI, cTo.c_str(), cSubject.c_str(),
cCc.c_str(), cBcc.c_str(), cMsg.c_str());
pRuntime->EndBlock();
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 435c383b34..65af6a1fa5 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -80,9 +80,9 @@ CFX_WideString StrTrim(const CFX_WideString& pStr) {
}
void AlertIfPossible(CJS_Context* pContext, const FX_WCHAR* swMsg) {
- CPDFSDK_Environment* pApp = pContext->GetReaderApp();
- if (pApp)
- pApp->JS_appAlert(swMsg, nullptr, 0, 3);
+ CPDFSDK_Environment* pEnv = pContext->GetReaderEnv();
+ if (pEnv)
+ pEnv->JS_appAlert(swMsg, nullptr, 0, 3);
}
} // namespace
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index fc2a440da9..a6c6c73528 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -25,7 +25,7 @@
class GlobalTimer {
public:
GlobalTimer(app* pObj,
- CPDFSDK_Environment* pApp,
+ CPDFSDK_Environment* pEnv,
CJS_Runtime* pRuntime,
int nType,
const CFX_WideString& script,
@@ -55,11 +55,11 @@ class GlobalTimer {
const uint32_t m_dwTimeOut;
const CFX_WideString m_swJScript;
CJS_Runtime::ObservedPtr m_pRuntime;
- CPDFSDK_Environment* const m_pApp;
+ CPDFSDK_Environment* const m_pEnv;
};
GlobalTimer::GlobalTimer(app* pObj,
- CPDFSDK_Environment* pApp,
+ CPDFSDK_Environment* pEnv,
CJS_Runtime* pRuntime,
int nType,
const CFX_WideString& script,
@@ -72,8 +72,8 @@ GlobalTimer::GlobalTimer(app* pObj,
m_dwTimeOut(dwTimeOut),
m_swJScript(script),
m_pRuntime(pRuntime),
- m_pApp(pApp) {
- CFX_SystemHandler* pHandler = m_pApp->GetSysHandler();
+ m_pEnv(pEnv) {
+ CFX_SystemHandler* pHandler = m_pEnv->GetSysHandler();
m_nTimerID = pHandler->SetTimer(dwElapse, Trigger);
(*GetGlobalTimerMap())[m_nTimerID] = this;
}
@@ -83,7 +83,7 @@ GlobalTimer::~GlobalTimer() {
return;
if (GetRuntime())
- m_pApp->GetSysHandler()->KillTimer(m_nTimerID);
+ m_pEnv->GetSysHandler()->KillTimer(m_nTimerID);
GetGlobalTimerMap()->erase(m_nTimerID);
}
@@ -217,11 +217,11 @@ FX_BOOL app::activeDocs(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- CPDFSDK_Environment* pApp = pContext->GetReaderApp();
+ CPDFSDK_Environment* pEnv = pContext->GetReaderEnv();
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument();
CJS_Array aDocs;
- if (CPDFSDK_Document* pDoc = pApp->GetSDKDocument()) {
+ if (CPDFSDK_Document* pDoc = pEnv->GetSDKDocument()) {
CJS_Document* pJSDocument = nullptr;
if (pDoc == pCurDoc) {
v8::Local<v8::Object> pObj = pRuntime->GetThisObj();
@@ -255,8 +255,8 @@ FX_BOOL app::calculate(IJS_Context* cc,
m_bCalculate = (FX_BOOL)bVP;
CJS_Context* pContext = (CJS_Context*)cc;
- CPDFSDK_Environment* pApp = pContext->GetReaderApp();
- if (CPDFSDK_Document* pDoc = pApp->GetSDKDocument())
+ CPDFSDK_Environment* pEnv = pContext->GetReaderEnv();
+ if (CPDFSDK_Document* pDoc = pEnv->GetSDKDocument())
pDoc->GetInterForm()->EnableCalculate((FX_BOOL)m_bCalculate);
} else {
vp << (bool)m_bCalculate;
@@ -322,7 +322,7 @@ FX_BOOL app::platform(IJS_Context* cc,
return FALSE;
#ifdef PDF_ENABLE_XFA
CPDFSDK_Environment* pEnv =
- static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp();
+ static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderEnv();
if (!pEnv)
return FALSE;
CFX_WideString platfrom = pEnv->GetPlatform();
@@ -342,7 +342,7 @@ FX_BOOL app::language(IJS_Context* cc,
return FALSE;
#ifdef PDF_ENABLE_XFA
CPDFSDK_Environment* pEnv =
- static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp();
+ static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderEnv();
if (!pEnv)
return FALSE;
CFX_WideString language = pEnv->GetLanguage();
@@ -391,8 +391,8 @@ FX_BOOL app::alert(IJS_Context* cc,
return FALSE;
}
- CPDFSDK_Environment* pApp = pRuntime->GetReaderApp();
- if (!pApp) {
+ CPDFSDK_Environment* pEnv = pRuntime->GetReaderEnv();
+ if (!pEnv) {
vRet = CJS_Value(pRuntime, 0);
return TRUE;
}
@@ -432,10 +432,10 @@ FX_BOOL app::alert(IJS_Context* cc,
swTitle = JSGetStringFromID(IDS_STRING_JSALERT);
pRuntime->BeginBlock();
- if (CPDFSDK_Document* pDoc = pApp->GetSDKDocument())
+ if (CPDFSDK_Document* pDoc = pEnv->GetSDKDocument())
pDoc->KillFocusAnnot();
- vRet = CJS_Value(pRuntime, pApp->JS_appAlert(swMsg.c_str(), swTitle.c_str(),
+ vRet = CJS_Value(pRuntime, pEnv->JS_appAlert(swMsg.c_str(), swTitle.c_str(),
iType, iIcon));
pRuntime->EndBlock();
return TRUE;
@@ -447,7 +447,7 @@ FX_BOOL app::beep(IJS_Context* cc,
CFX_WideString& sError) {
if (params.size() == 1) {
CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
- CPDFSDK_Environment* pEnv = pRuntime->GetReaderApp();
+ CPDFSDK_Environment* pEnv = pRuntime->GetReaderEnv();
pEnv->JS_appBeep(params[0].ToInt(pRuntime));
return TRUE;
}
@@ -492,10 +492,10 @@ FX_BOOL app::setInterval(IJS_Context* cc,
}
uint32_t dwInterval = params.size() > 1 ? params[1].ToInt(pRuntime) : 1000;
- CPDFSDK_Environment* pApp = pRuntime->GetReaderApp();
+ CPDFSDK_Environment* pEnv = pRuntime->GetReaderEnv();
GlobalTimer* timerRef =
- new GlobalTimer(this, pApp, pRuntime, 0, script, dwInterval, 0);
+ new GlobalTimer(this, pEnv, pRuntime, 0, script, dwInterval, 0);
m_Timers.insert(std::unique_ptr<GlobalTimer>(timerRef));
v8::Local<v8::Object> pRetObj =
@@ -526,10 +526,10 @@ FX_BOOL app::setTimeOut(IJS_Context* cc,
}
uint32_t dwTimeOut = params.size() > 1 ? params[1].ToInt(pRuntime) : 1000;
- CPDFSDK_Environment* pApp = pRuntime->GetReaderApp();
+ CPDFSDK_Environment* pEnv = pRuntime->GetReaderEnv();
GlobalTimer* timerRef =
- new GlobalTimer(this, pApp, pRuntime, 1, script, dwTimeOut, dwTimeOut);
+ new GlobalTimer(this, pEnv, pRuntime, 1, script, dwTimeOut, dwTimeOut);
m_Timers.insert(std::unique_ptr<GlobalTimer>(timerRef));
v8::Local<v8::Object> pRetObj =
@@ -677,7 +677,7 @@ FX_BOOL app::mailMsg(IJS_Context* cc,
pRuntime->BeginBlock();
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
- pContext->GetReaderApp()->JS_docmailForm(nullptr, 0, bUI, cTo.c_str(),
+ pContext->GetReaderEnv()->JS_docmailForm(nullptr, 0, bUI, cTo.c_str(),
cSubject.c_str(), cCc.c_str(),
cBcc.c_str(), cMsg.c_str());
pRuntime->EndBlock();
@@ -792,7 +792,7 @@ FX_BOOL app::response(IJS_Context* cc,
memset(pBuff.get(), 0, MAX_INPUT_BYTES + 2);
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
- int nLengthBytes = pContext->GetReaderApp()->JS_appResponse(
+ int nLengthBytes = pContext->GetReaderEnv()->JS_appResponse(
swQuestion.c_str(), swTitle.c_str(), swDefault.c_str(), swLabel.c_str(),
bPassword, pBuff.get(), MAX_INPUT_BYTES);
diff --git a/fpdfsdk/javascript/cjs_context.cpp b/fpdfsdk/javascript/cjs_context.cpp
index 4a6e4d3a64..3f13cd3dc1 100644
--- a/fpdfsdk/javascript/cjs_context.cpp
+++ b/fpdfsdk/javascript/cjs_context.cpp
@@ -21,8 +21,8 @@ CPDFSDK_Document* CJS_Context::GetReaderDocument() {
return m_pRuntime->GetReaderDocument();
}
-CPDFSDK_Environment* CJS_Context::GetReaderApp() {
- return m_pRuntime->GetReaderApp();
+CPDFSDK_Environment* CJS_Context::GetReaderEnv() {
+ return m_pRuntime->GetReaderEnv();
}
FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
diff --git a/fpdfsdk/javascript/cjs_context.h b/fpdfsdk/javascript/cjs_context.h
index 03403de6b3..41f2042b7e 100644
--- a/fpdfsdk/javascript/cjs_context.h
+++ b/fpdfsdk/javascript/cjs_context.h
@@ -125,7 +125,7 @@ class CJS_Context : public IJS_Context {
CJS_Runtime* GetJSRuntime() const { return m_pRuntime; }
CJS_EventHandler* GetEventHandler() const { return m_pEventHandler.get(); }
- CPDFSDK_Environment* GetReaderApp();
+ CPDFSDK_Environment* GetReaderEnv();
CPDFSDK_Document* GetReaderDocument();
private:
diff --git a/fpdfsdk/javascript/cjs_runtime.cpp b/fpdfsdk/javascript/cjs_runtime.cpp
index 1afde804ca..0ca64b10f3 100644
--- a/fpdfsdk/javascript/cjs_runtime.cpp
+++ b/fpdfsdk/javascript/cjs_runtime.cpp
@@ -63,14 +63,14 @@ CJS_Runtime* CJS_Runtime::CurrentRuntimeFromIsolate(v8::Isolate* pIsolate) {
CFXJS_Engine::CurrentEngineFromIsolate(pIsolate));
}
-CJS_Runtime::CJS_Runtime(CPDFSDK_Environment* pApp)
- : m_pApp(pApp),
+CJS_Runtime::CJS_Runtime(CPDFSDK_Environment* pEnv)
+ : m_pEnv(pEnv),
m_pDocument(nullptr),
m_bBlocking(false),
m_isolateManaged(false) {
v8::Isolate* pIsolate = nullptr;
#ifndef PDF_ENABLE_XFA
- IPDF_JSPLATFORM* pPlatform = m_pApp->GetFormFillInfo()->m_pJsPlatform;
+ IPDF_JSPLATFORM* pPlatform = m_pEnv->GetFormFillInfo()->m_pJsPlatform;
if (pPlatform->version <= 2) {
unsigned int embedderDataSlot = 0;
v8::Isolate* pExternalIsolate = nullptr;
@@ -88,7 +88,7 @@ CJS_Runtime::CJS_Runtime(CPDFSDK_Environment* pApp)
pIsolate = CPDFXFA_App::GetInstance()->GetJSERuntime();
SetIsolate(pIsolate);
} else {
- IPDF_JSPLATFORM* pPlatform = m_pApp->GetFormFillInfo()->m_pJsPlatform;
+ IPDF_JSPLATFORM* pPlatform = m_pEnv->GetFormFillInfo()->m_pJsPlatform;
if (pPlatform->version <= 2) {
unsigned int embedderDataSlot = 0;
v8::Isolate* pExternalIsolate = nullptr;
diff --git a/fpdfsdk/javascript/cjs_runtime.h b/fpdfsdk/javascript/cjs_runtime.h
index 12f902d7df..da7e384321 100644
--- a/fpdfsdk/javascript/cjs_runtime.h
+++ b/fpdfsdk/javascript/cjs_runtime.h
@@ -42,7 +42,7 @@ class CJS_Runtime : public IJS_Runtime,
int ExecuteScript(const CFX_WideString& script,
CFX_WideString* info) override;
- CPDFSDK_Environment* GetReaderApp() const { return m_pApp; }
+ CPDFSDK_Environment* GetReaderEnv() const { return m_pEnv; }
// Returns true if the event isn't already found in the set.
bool AddEventToSet(const FieldEvent& event);
@@ -63,7 +63,7 @@ class CJS_Runtime : public IJS_Runtime,
void DefineJSObjects();
std::vector<std::unique_ptr<CJS_Context>> m_ContextArray;
- CPDFSDK_Environment* const m_pApp;
+ CPDFSDK_Environment* const m_pEnv;
CPDFSDK_Document* m_pDocument;
bool m_bBlocking;
bool m_isolateManaged;
diff --git a/fpdfsdk/javascript/global.cpp b/fpdfsdk/javascript/global.cpp
index 42ae8d54ce..b55953907f 100644
--- a/fpdfsdk/javascript/global.cpp
+++ b/fpdfsdk/javascript/global.cpp
@@ -33,7 +33,7 @@ void CJS_Global::InitInstance(IJS_Runtime* pIRuntime) {
CJS_Runtime* pRuntime = static_cast<CJS_Runtime*>(pIRuntime);
JSGlobalAlternate* pGlobal =
static_cast<JSGlobalAlternate*>(GetEmbedObject());
- pGlobal->Initial(pRuntime->GetReaderApp());
+ pGlobal->Initial(pRuntime->GetReaderEnv());
}
JSGlobalData::JSGlobalData()
@@ -49,16 +49,16 @@ JSGlobalData::~JSGlobalData() {
}
JSGlobalAlternate::JSGlobalAlternate(CJS_Object* pJSObject)
- : CJS_EmbedObj(pJSObject), m_pApp(nullptr) {}
+ : CJS_EmbedObj(pJSObject), m_pEnv(nullptr) {}
JSGlobalAlternate::~JSGlobalAlternate() {
DestroyGlobalPersisitentVariables();
m_pGlobalData->Release();
}
-void JSGlobalAlternate::Initial(CPDFSDK_Environment* pApp) {
- m_pApp = pApp;
- m_pGlobalData = CJS_GlobalData::GetRetainedInstance(pApp);
+void JSGlobalAlternate::Initial(CPDFSDK_Environment* pEnv) {
+ m_pEnv = pEnv;
+ m_pGlobalData = CJS_GlobalData::GetRetainedInstance(pEnv);
UpdateGlobalPersistentVariables();
}
diff --git a/fpdfsdk/javascript/global.h b/fpdfsdk/javascript/global.h
index 165cf3a443..6a104be60f 100644
--- a/fpdfsdk/javascript/global.h
+++ b/fpdfsdk/javascript/global.h
@@ -47,7 +47,7 @@ class JSGlobalAlternate : public CJS_EmbedObj {
FX_BOOL DelProperty(IJS_Context* cc,
const FX_WCHAR* propname,
CFX_WideString& sError);
- void Initial(CPDFSDK_Environment* pApp);
+ void Initial(CPDFSDK_Environment* pEnv);
private:
void UpdateGlobalPersistentVariables();
@@ -68,7 +68,7 @@ class JSGlobalAlternate : public CJS_EmbedObj {
std::map<CFX_ByteString, JSGlobalData*> m_mapGlobal;
CFX_WideString m_sFilePath;
CJS_GlobalData* m_pGlobalData;
- CPDFSDK_Environment* m_pApp;
+ CPDFSDK_Environment* m_pEnv;
};
class CJS_Global : public CJS_Object {