summaryrefslogtreecommitdiff
path: root/fpdfsdk/fsdk_actionhandler.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-16 19:25:30 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-16 19:25:30 +0000
commit9d7c7ff0a5f0da6e7574557e5a8e82b9b5b7c1ae (patch)
treea9559fdcd8e24951985968cc9f8c32c6f8da1b5d /fpdfsdk/fsdk_actionhandler.cpp
parent7d75650672a848428aaadb603b2814d33dfb479f (diff)
downloadpdfium-9d7c7ff0a5f0da6e7574557e5a8e82b9b5b7c1ae.tar.xz
Make more variables const-ref.chromium/3373
Found by ClangTidy. BUG=pdfium:1040 Change-Id: I6d7cb26ae2d12f5650f73596d0b991234b076f57 Reviewed-on: https://pdfium-review.googlesource.com/28712 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fsdk_actionhandler.cpp')
-rw-r--r--fpdfsdk/fsdk_actionhandler.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/fpdfsdk/fsdk_actionhandler.cpp b/fpdfsdk/fsdk_actionhandler.cpp
index c0e413f158..305d905c85 100644
--- a/fpdfsdk/fsdk_actionhandler.cpp
+++ b/fpdfsdk/fsdk_actionhandler.cpp
@@ -525,7 +525,7 @@ void CPDFSDK_ActionHandler::DoAction_ResetForm(
void CPDFSDK_ActionHandler::RunScriptForAction(
const CPDF_Action& action,
CPDFSDK_FormFillEnvironment* pFormFillEnv,
- std::function<void(IJS_EventContext* context)> cb) {
+ const RunScriptCallback& cb) {
if (!pFormFillEnv->IsJSPlatformPresent())
return;
@@ -536,10 +536,9 @@ void CPDFSDK_ActionHandler::RunScriptForAction(
RunScript(pFormFillEnv, swJS, cb);
}
-void CPDFSDK_ActionHandler::RunScript(
- CPDFSDK_FormFillEnvironment* pFormFillEnv,
- const WideString& script,
- std::function<void(IJS_EventContext* context)> cb) {
+void CPDFSDK_ActionHandler::RunScript(CPDFSDK_FormFillEnvironment* pFormFillEnv,
+ const WideString& script,
+ const RunScriptCallback& cb) {
IJS_Runtime* pRuntime = pFormFillEnv->GetIJSRuntime();
IJS_EventContext* pContext = pRuntime->NewEventContext();