diff options
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_context.h | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 16 |
3 files changed, 12 insertions, 14 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp index d05e2f6b34..784344f1c6 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp @@ -104,7 +104,7 @@ bool CPDFXFA_Context::LoadXFADoc() { return false; } m_pXFADoc->StopLoad(); - m_pXFADoc->GetXFADoc()->InitScriptContext(GetJSERuntime()); + m_pXFADoc->GetXFADoc()->InitScriptContext(GetCJSRuntime()->GetIsolate()); if (m_pXFADoc->GetFormType() == FormType::kXFAFull) m_FormType = FormType::kXFAFull; @@ -198,14 +198,12 @@ void CPDFXFA_Context::ClearChangeMark() { m_pFormFillEnv->ClearChangeMark(); } -v8::Isolate* CPDFXFA_Context::GetJSERuntime() const { +CJS_Runtime* CPDFXFA_Context::GetCJSRuntime() const { if (!m_pFormFillEnv) return nullptr; // XFA requires V8, if we have V8 then we have a CJS_Runtime and not the stub. - CJS_Runtime* runtime = - static_cast<CJS_Runtime*>(m_pFormFillEnv->GetJSRuntime()); - return runtime->GetIsolate(); + return static_cast<CJS_Runtime*>(m_pFormFillEnv->GetIJSRuntime()); } WideString CPDFXFA_Context::GetAppTitle() const { diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h index acef8f2aa8..3eca1b548c 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h @@ -45,7 +45,7 @@ class CPDFXFA_Context : public IXFA_AppProvider { return m_FormType == FormType::kXFAFull || m_FormType == FormType::kXFAForeground; } - v8::Isolate* GetJSERuntime() const; + CJS_Runtime* GetCJSRuntime() const; CXFA_FFApp* GetXFAApp() { return m_pXFAApp.get(); } CPDFSDK_FormFillEnvironment* GetFormFillEnv() const { diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index f3acf5624c..d47c145700 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -990,13 +990,13 @@ bool CPDFXFA_DocEnvironment::SetGlobalProperty(CXFA_FFDoc* hDoc, 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 @@ bool CPDFXFA_DocEnvironment::GetGlobalProperty(CXFA_FFDoc* hDoc, 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; } |