summaryrefslogtreecommitdiff
path: root/fxjs/cjs_event_context.cpp
AgeCommit message (Collapse)Author
2018-06-21Pass output parameters as pointers in ijs_event_contextTom Sepez
It is hard to tell if there is some unsavory stuff going on with references otherwise. Avoids some const_casts in the process. Add some UnownedPtrs along the way to check caller's storage duration. Change-Id: Ic8d85802083f0b27e07993ea25f8f1c15fca1712 Reviewed-on: https://pdfium-review.googlesource.com/35750 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-21Remove WideString::c_str() calls where possible.Tom Sepez
Many of these cause a string duplication as we go from Widestring => c_str => Widestring Change-Id: I0dfa952e66f89138e719ff9200db3d9397839e28 Reviewed-on: https://pdfium-review.googlesource.com/35790 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-06-04Lowercase JS_Define.{h,cpp} and CJS_Define.hTom Sepez
Consistency with file naming conventions. No functional change. Change-Id: I596c4be5bbf0510950c44a7d9d80f59537739c3b Reviewed-on: https://pdfium-review.googlesource.com/33593 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: 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-02-02Remove V8 context from CJS_V8Tom Sepez
Makes CFXJS_Engine and CFXJSE_Engine consistent with each other in that both have a V8 context to themselves, and not one inheritted from the CJS_V8 (which is now more per-isolate than per-context). Consolidate NewLocalContext() and GetPersistentContext(), which both did the exact same thing under the covers once inside v8 land. Rename a few things to make it simpler. Change-Id: I68905db9ad44253063da235fcb276a75627a2dbc Reviewed-on: https://pdfium-review.googlesource.com/25170 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-10-30Convert JS resource into enum classchromium/3254Dan Sinclair
This CL converts the #defines into an enum class. Change-Id: I895e29e1d46a7a82d7be896f5776eb00d28559f5 Reviewed-on: https://pdfium-review.googlesource.com/17091 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@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>