summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-12 12:05:44 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-12 12:05:44 -0700
commit8779fa8578cf3336ddd4473f833900aba2e595fb (patch)
treedf330933cab06ed2c6a6b5b825680fd2b4731d57 /fpdfsdk/javascript
parent7cbe68e34257b460bfa3baf0ea68fd6d50e1bc77 (diff)
downloadpdfium-8779fa8578cf3336ddd4473f833900aba2e595fb.tar.xz
Cleanup env variable names
This CL cleans up any old m_pEnv variables to be correctly named m_pFormFillEnv. Review-Url: https://codereview.chromium.org/2412523002
Diffstat (limited to 'fpdfsdk/javascript')
-rw-r--r--fpdfsdk/javascript/Document.cpp14
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp6
-rw-r--r--fpdfsdk/javascript/global.cpp8
-rw-r--r--fpdfsdk/javascript/global.h4
4 files changed, 16 insertions, 16 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 6b795a02ec..0b08f66f33 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -402,10 +402,10 @@ FX_BOOL Document::mailForm(IJS_Context* cc,
return FALSE;
pRuntime->BeginBlock();
- CPDFSDK_FormFillEnvironment* pEnv = pContext->GetFormFillEnv();
- pEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI,
- cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(),
- cMsg.c_str());
+ CPDFSDK_FormFillEnvironment* pFormFillEnv = pContext->GetFormFillEnv();
+ pFormFillEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI,
+ cTo.c_str(), cSubject.c_str(), cCc.c_str(),
+ cBcc.c_str(), cMsg.c_str());
pRuntime->EndBlock();
return TRUE;
}
@@ -751,9 +751,9 @@ FX_BOOL Document::mailDoc(IJS_Context* cc,
}
pRuntime->BeginBlock();
- CPDFSDK_FormFillEnvironment* pEnv = pRuntime->GetFormFillEnv();
- pEnv->JS_docmailForm(nullptr, 0, bUI, cTo.c_str(), cSubject.c_str(),
- cCc.c_str(), cBcc.c_str(), cMsg.c_str());
+ CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv();
+ pFormFillEnv->JS_docmailForm(nullptr, 0, bUI, cTo.c_str(), cSubject.c_str(),
+ cCc.c_str(), cBcc.c_str(), cMsg.c_str());
pRuntime->EndBlock();
return TRUE;
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 344af5aa02..2310200084 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -79,9 +79,9 @@ CFX_WideString StrTrim(const CFX_WideString& pStr) {
}
void AlertIfPossible(CJS_Context* pContext, const FX_WCHAR* swMsg) {
- CPDFSDK_FormFillEnvironment* pEnv = pContext->GetFormFillEnv();
- if (pEnv)
- pEnv->JS_appAlert(swMsg, nullptr, 0, 3);
+ CPDFSDK_FormFillEnvironment* pFormFillEnv = pContext->GetFormFillEnv();
+ if (pFormFillEnv)
+ pFormFillEnv->JS_appAlert(swMsg, nullptr, 0, 3);
}
} // namespace
diff --git a/fpdfsdk/javascript/global.cpp b/fpdfsdk/javascript/global.cpp
index 3ac8c40384..eb7d2cac19 100644
--- a/fpdfsdk/javascript/global.cpp
+++ b/fpdfsdk/javascript/global.cpp
@@ -49,16 +49,16 @@ JSGlobalData::~JSGlobalData() {
}
JSGlobalAlternate::JSGlobalAlternate(CJS_Object* pJSObject)
- : CJS_EmbedObj(pJSObject), m_pEnv(nullptr) {}
+ : CJS_EmbedObj(pJSObject), m_pFormFillEnv(nullptr) {}
JSGlobalAlternate::~JSGlobalAlternate() {
DestroyGlobalPersisitentVariables();
m_pGlobalData->Release();
}
-void JSGlobalAlternate::Initial(CPDFSDK_FormFillEnvironment* pEnv) {
- m_pEnv = pEnv;
- m_pGlobalData = CJS_GlobalData::GetRetainedInstance(pEnv);
+void JSGlobalAlternate::Initial(CPDFSDK_FormFillEnvironment* pFormFillEnv) {
+ m_pFormFillEnv = pFormFillEnv;
+ m_pGlobalData = CJS_GlobalData::GetRetainedInstance(pFormFillEnv);
UpdateGlobalPersistentVariables();
}
diff --git a/fpdfsdk/javascript/global.h b/fpdfsdk/javascript/global.h
index 6240fbfd4f..d5288e38b1 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_FormFillEnvironment* pEnv);
+ void Initial(CPDFSDK_FormFillEnvironment* pFormFillEnv);
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_FormFillEnvironment* m_pEnv;
+ CPDFSDK_FormFillEnvironment* m_pFormFillEnv;
};
class CJS_Global : public CJS_Object {