summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_actionhandler.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-05-17 13:53:52 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-17 13:53:52 +0000
commitdc5d88bcebbeeb696b405464e901add55d1efaf7 (patch)
tree54bc913015ea4d08b9fe46997f25a3153cbc70d7 /fpdfsdk/cpdfsdk_actionhandler.cpp
parentdb3c6cefceddf25c25f1205d7b633f09e873bf98 (diff)
downloadpdfium-dc5d88bcebbeeb696b405464e901add55d1efaf7.tar.xz
Convert JS execute methods to return Optional<IJS_Runtime::JS_Error>
This CL changes several of the JS execution methods to to return an Optional<IJS_Runtime::JS_Error> instead of a bool with a WideString out param. The IJS_Runtime::JS_Error will contain the line, column and exception message if an error occurs during execution. Change-Id: I37785ae6cd133a4c94ad8d25289473600b8a5d19 Reviewed-on: https://pdfium-review.googlesource.com/32614 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_actionhandler.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_actionhandler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_actionhandler.cpp b/fpdfsdk/cpdfsdk_actionhandler.cpp
index 98c01240b2..660b09c515 100644
--- a/fpdfsdk/cpdfsdk_actionhandler.cpp
+++ b/fpdfsdk/cpdfsdk_actionhandler.cpp
@@ -544,8 +544,7 @@ void CPDFSDK_ActionHandler::RunScript(CPDFSDK_FormFillEnvironment* pFormFillEnv,
cb(pContext);
- WideString csInfo;
- pContext->RunScript(script, &csInfo);
+ pContext->RunScript(script);
pRuntime->ReleaseEventContext(pContext);
- // TODO(dsinclair): Return error if RunScript returns false.
+ // TODO(dsinclair): Return error if RunScript returns a IJS_Runtime::JS_Error.
}