summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-02-01 02:15:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-01 02:15:44 +0000
commitf5ca90c00198c72488fd337ec8029a7f74b335b8 (patch)
tree8bd701cb4e662069470fc0ece5889823242f252e /fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
parent33c7ade187724c767fff74913cda63de182b0ce2 (diff)
downloadpdfium-f5ca90c00198c72488fd337ec8029a7f74b335b8.tar.xz
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>
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_context.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp8
1 files changed, 3 insertions, 5 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 {