Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Unified Diff: fpdfsdk/javascript/PublicMethods.cpp

Issue 2399943002: Remove CPDFSDK_Document from IJS_Context (Closed)
Patch Set: Rebase to master Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/javascript/JS_Runtime_Stub.cpp ('k') | fpdfsdk/javascript/app.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/PublicMethods.cpp
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 3e2bc06f238ad90ed7d538515d1ec02830178c31..d4f17a8b2e1a22b006c83cb1e3e7fc03c5f96932 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -80,7 +80,7 @@ CFX_WideString StrTrim(const CFX_WideString& pStr) {
}
void AlertIfPossible(CJS_Context* pContext, const FX_WCHAR* swMsg) {
- CPDFSDK_FormFillEnvironment* pEnv = pContext->GetReaderEnv();
+ CPDFSDK_FormFillEnvironment* pEnv = pContext->GetFormFillEnv();
if (pEnv)
pEnv->JS_appAlert(swMsg, nullptr, 0, 3);
}
@@ -1659,8 +1659,8 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
- CPDFSDK_Document* pReaderDoc = pContext->GetReaderDocument();
- CPDFSDK_InterForm* pReaderInterForm = pReaderDoc->GetInterForm();
+ CPDFSDK_InterForm* pReaderInterForm =
+ pContext->GetFormFillEnv()->GetSDKDocument()->GetInterForm();
CPDF_InterForm* pInterForm = pReaderInterForm->GetInterForm();
CFX_WideString sFunction = params[0].ToCFXWideString(pRuntime);
« no previous file with comments | « fpdfsdk/javascript/JS_Runtime_Stub.cpp ('k') | fpdfsdk/javascript/app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698