summaryrefslogtreecommitdiff
path: root/fxjs/cjs_eventhandler.cpp
AgeCommit message (Collapse)Author
2018-08-14Remove optional argument from NewFXJSBoundObject().Tom Sepez
Additionally, we have a pre-existing enum type that is more meaningful than just a boolean. Change-Id: Ie6ad13a3c9b22e34dedf7a5a9b5b9cc2a49b1f03 Reviewed-on: https://pdfium-review.googlesource.com/40190 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
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-21Avoid const-refs to implicitly constructed strings.Tom Sepez
Because the invisible temporary goes out of scope at the next semicolon. Also avoid returning const string references since the cost is low to properly keep the string alive. Change-Id: Id283e4fd99f79a02d79d739a533a4ce05e831e2a Reviewed-on: https://pdfium-review.googlesource.com/35710 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-06Stop using some v8::Context slot to find runtime.Tom Sepez
Instead, use the object binding's pointer. Puts the cart back behind the horse. Change-Id: I4c06ae991b871c6e90b0e6c70b69886addca2354 Reviewed-on: https://pdfium-review.googlesource.com/33630 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: 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-07Mark parts of CJS_EventHandler as private.Lei Zhang
Also change Initial() to Initialize(). Change-Id: Ic63ee1cace0012ad570db25447ced752bddd7f86 Reviewed-on: https://pdfium-review.googlesource.com/28150 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-26Replace some c-style cast with static_cast<>Tom Sepez
Change-Id: I9dd6a36770f77f3df6c4395572785d37402eadc2 Reviewed-on: https://pdfium-review.googlesource.com/31350 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-07Split creation of ordinary object and bound objects in FXJS.chromium/3343Tom Sepez
One can be performed by the CJS_V8 layer, the other requires the full FXJS mechanism. Avoids using -1 as a special case. Change-Id: I4a14ccb6a7fea393f84b70a07ada03b1a83c7d36 Reviewed-on: https://pdfium-review.googlesource.com/25830 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-05Fold CJS_EmbedObj classes into CJS_Object classesDan Sinclair
This CL removes the CJS_EmbedObj class and various subclasses and folds the subclasses into their CJS_Object counterparts. Change-Id: If6b882a4995c0b1bf83ac783f5c27ba9216c2d5c Reviewed-on: https://pdfium-review.googlesource.com/25410 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-11-20Make some CJS_EventHandler methods const.Lei Zhang
Change-Id: Ie95b6a4c2613b5e110d2dd1244dd4a87375f624f Reviewed-on: https://pdfium-review.googlesource.com/18750 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@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>