Rename some CJS / IJS names for clarity.
Prior cleanup before making FXJS/FXJSE share one v8 context.
Return CJS object rather than isolate in one place.
Use unique_ptr in one place.
Change-Id: I837ae4880368a6d72e59b38f37e06908e05c34bd
Reviewed-on: https://pdfium-review.googlesource.com/24950
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index f3acf56..d47c145 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -990,13 +990,13 @@
if (hDoc != m_pContext->GetXFADoc())
return false;
if (!m_pContext->GetFormFillEnv() ||
- !m_pContext->GetFormFillEnv()->GetJSRuntime()) {
+ !m_pContext->GetFormFillEnv()->GetIJSRuntime()) {
return false;
}
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
- IJS_EventContext* pContext = pFormFillEnv->GetJSRuntime()->NewEventContext();
- bool bRet = pFormFillEnv->GetJSRuntime()->SetValueByName(szPropName, pValue);
- pFormFillEnv->GetJSRuntime()->ReleaseEventContext(pContext);
+ IJS_EventContext* pContext = pFormFillEnv->GetIJSRuntime()->NewEventContext();
+ bool bRet = pFormFillEnv->GetIJSRuntime()->SetValueByName(szPropName, pValue);
+ pFormFillEnv->GetIJSRuntime()->ReleaseEventContext(pContext);
return bRet;
}
@@ -1006,12 +1006,12 @@
if (hDoc != m_pContext->GetXFADoc())
return false;
if (!m_pContext->GetFormFillEnv() ||
- !m_pContext->GetFormFillEnv()->GetJSRuntime()) {
+ !m_pContext->GetFormFillEnv()->GetIJSRuntime()) {
return false;
}
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
- IJS_EventContext* pContext = pFormFillEnv->GetJSRuntime()->NewEventContext();
- bool bRet = pFormFillEnv->GetJSRuntime()->GetValueByName(szPropName, pValue);
- pFormFillEnv->GetJSRuntime()->ReleaseEventContext(pContext);
+ IJS_EventContext* pContext = pFormFillEnv->GetIJSRuntime()->NewEventContext();
+ bool bRet = pFormFillEnv->GetIJSRuntime()->GetValueByName(szPropName, pValue);
+ pFormFillEnv->GetIJSRuntime()->ReleaseEventContext(pContext);
return bRet;
}