summaryrefslogtreecommitdiff
path: root/fxjs/ijs_runtime.h
AgeCommit message (Collapse)Author
2018-10-29Make IJS_Runtime::AsCJSRuntime be XFA-onlyTom Sepez
Since it is only called from the XFA side. Change-Id: I6e34b39bb0c28db9b367215fae0285acafa22c14 Reviewed-on: https://pdfium-review.googlesource.com/c/44810 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-18Forward declare some fxjs/ classes.Lei Zhang
And remove unnecessary fxjs/ #includes in header files. Change-Id: If89dd2717b6ba93dbb7493e8ca80d78deaa64b06 Reviewed-on: https://pdfium-review.googlesource.com/c/44270 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-10Fix some random nits.Lei Zhang
Change-Id: I735c057d4900bcd58c1041df16b885dc7c9ed27d Reviewed-on: https://pdfium-review.googlesource.com/c/43793 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-22Use UnownedPtr<> in IJS_Runtime.Tom Sepez
Change-Id: I9f5f3c54144163b5ac188e38fcb8d8fa93d4bd7a Reviewed-on: https://pdfium-review.googlesource.com/40951 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-05Introduce IJS_Runtime::ScopedEventContext helper class.chromium/3451Tom Sepez
This proves that m_EventContextArray is, in fact, a stack. Tidy one function by using AutoRestorer while at it. Change-Id: I319538b4eadcd9ce83319aa73861635dd5eb8c36 Reviewed-on: https://pdfium-review.googlesource.com/33970 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-17Convert JS execute methods to return Optional<IJS_Runtime::JS_Error>Dan Sinclair
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>
2018-04-23Disable JavaScript entirely if no JSPlatform passed by embedder.Tom Sepez
Allows run-time selection of whether to permit JS inside PDF. Previously, this was a link-time decision only. This requires a little more caution before we decide that we have the CJS_Runtime, and not the CJS_RuntimeStub in a few casts. Adds a kDisableJavaScript option to the form fill embeddertests. Adds a --disable-javascript flag to the pdfium_test executable. Also adds a --disable-xfa flag while we're at it. Change-Id: I8d8ac95f6474459cadba9a60572fbb342e984646 Reviewed-on: https://pdfium-review.googlesource.com/31090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-02Make global object function names clearer.Tom Sepez
Also tidy some sub-expressions. Change-Id: Ieabd5f6cea60e8ec03c8ce5ebe372fc80b05a7bb Reviewed-on: https://pdfium-review.googlesource.com/25150 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-01Rename some CJS / IJS names for clarity.Tom Sepez
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>
2017-10-30Move fpdfsdk/javascript to fxjs/Dan Sinclair
This CL moves all of the CJS files into fxjs. The :javascript build rule is removed and :fxjs is used instead. Change-Id: I1701b308f51317d0346c7401b43812c3f43a27bf Reviewed-on: https://pdfium-review.googlesource.com/17047 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>