diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-02-01 02:15:44 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-01 02:15:44 +0000 |
commit | f5ca90c00198c72488fd337ec8029a7f74b335b8 (patch) | |
tree | 8bd701cb4e662069470fc0ece5889823242f252e /fpdfsdk/fsdk_actionhandler.cpp | |
parent | 33c7ade187724c767fff74913cda63de182b0ce2 (diff) | |
download | pdfium-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/fsdk_actionhandler.cpp')
-rw-r--r-- | fpdfsdk/fsdk_actionhandler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/fsdk_actionhandler.cpp b/fpdfsdk/fsdk_actionhandler.cpp index 6fcf9d41c1..0059bb919c 100644 --- a/fpdfsdk/fsdk_actionhandler.cpp +++ b/fpdfsdk/fsdk_actionhandler.cpp @@ -49,7 +49,7 @@ bool CPDFSDK_ActionHandler::DoAction_FieldJavaScript( CPDF_FormField* pFormField, PDFSDK_FieldAction* data) { ASSERT(pFormFillEnv); - if (pFormFillEnv->IsJSInitiated() && + if (pFormFillEnv->IsJSPlatformPresent() && JsAction.GetType() == CPDF_Action::JavaScript) { WideString swJS = JsAction.GetJavaScript(); if (!swJS.IsEmpty()) { @@ -124,7 +124,7 @@ bool CPDFSDK_ActionHandler::ExecuteDocumentOpenAction( ASSERT(pFormFillEnv); if (action.GetType() == CPDF_Action::JavaScript) { - if (pFormFillEnv->IsJSInitiated()) { + if (pFormFillEnv->IsJSPlatformPresent()) { WideString swJS = action.GetJavaScript(); if (!swJS.IsEmpty()) RunDocumentOpenJavaScript(pFormFillEnv, L"", swJS); @@ -184,7 +184,7 @@ bool CPDFSDK_ActionHandler::ExecuteDocumentPageAction( ASSERT(pFormFillEnv); if (action.GetType() == CPDF_Action::JavaScript) { - if (pFormFillEnv->IsJSInitiated()) { + if (pFormFillEnv->IsJSPlatformPresent()) { WideString swJS = action.GetJavaScript(); if (!swJS.IsEmpty()) RunDocumentPageJavaScript(pFormFillEnv, type, swJS); @@ -229,7 +229,7 @@ bool CPDFSDK_ActionHandler::ExecuteFieldAction( ASSERT(pFormFillEnv); if (action.GetType() == CPDF_Action::JavaScript) { - if (pFormFillEnv->IsJSInitiated()) { + if (pFormFillEnv->IsJSPlatformPresent()) { WideString swJS = action.GetJavaScript(); if (!swJS.IsEmpty()) { RunFieldJavaScript(pFormFillEnv, pFormField, type, data, swJS); @@ -526,7 +526,7 @@ void CPDFSDK_ActionHandler::RunScriptForAction( const CPDF_Action& action, CPDFSDK_FormFillEnvironment* pFormFillEnv, std::function<void(IJS_EventContext* context)> cb) { - if (!pFormFillEnv->IsJSInitiated()) + if (!pFormFillEnv->IsJSPlatformPresent()) return; WideString swJS = action.GetJavaScript(); @@ -540,7 +540,7 @@ void CPDFSDK_ActionHandler::RunScript( CPDFSDK_FormFillEnvironment* pFormFillEnv, const WideString& script, std::function<void(IJS_EventContext* context)> cb) { - IJS_Runtime* pRuntime = pFormFillEnv->GetJSRuntime(); + IJS_Runtime* pRuntime = pFormFillEnv->GetIJSRuntime(); IJS_EventContext* pContext = pRuntime->NewEventContext(); cb(pContext); |