diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-05-17 13:53:52 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-17 13:53:52 +0000 |
commit | dc5d88bcebbeeb696b405464e901add55d1efaf7 (patch) | |
tree | 54bc913015ea4d08b9fe46997f25a3153cbc70d7 /fxjs/cjs_runtime.h | |
parent | db3c6cefceddf25c25f1205d7b633f09e873bf98 (diff) | |
download | pdfium-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 'fxjs/cjs_runtime.h')
-rw-r--r-- | fxjs/cjs_runtime.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fxjs/cjs_runtime.h b/fxjs/cjs_runtime.h index c5e69fbdc8..0c32562304 100644 --- a/fxjs/cjs_runtime.h +++ b/fxjs/cjs_runtime.h @@ -37,7 +37,8 @@ class CJS_Runtime : public IJS_Runtime, IJS_EventContext* NewEventContext() override; void ReleaseEventContext(IJS_EventContext* pContext) override; CPDFSDK_FormFillEnvironment* GetFormFillEnv() const override; - int ExecuteScript(const WideString& script, WideString* info) override; + Optional<IJS_Runtime::JS_Error> ExecuteScript( + const WideString& script) override; CJS_EventContext* GetCurrentEventContext() const; |