summaryrefslogtreecommitdiff
path: root/fxjs/js_define.h
AgeCommit message (Collapse)Author
2018-10-18Remove PrintParams object.Tom Sepez
The only way to theoretically get one is via doc.getPrintParams(), and it always returns in error. Even if one were returend to JS, there aren't any methods/callbacks to change its properties. Even if there were methods to change its properties, the information it stores doesn't align with what is in the JS spec for this object. Even if it were aligned with the JS spec, the way we check for its presence as the ninth parameter in CJS_Document::print() doesn't match the way its use is documented in the spec as the sole first parameter. Instead implement the older, simpler behaviour as spec'd prior to 6.0, and toss this enhancement altogether. Move function to check the result of ExpandKeywordParams() to js_define.h so other files can use it. Update comment in that file to remove reference to deprecated enum. Expand test for API and introduce callback to log parameters. Change-Id: I047e2be0d2afbad91d6b58c6c74bbea083fed330 Reviewed-on: https://pdfium-review.googlesource.com/c/44271 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-18Do more IWYU in fxjs/.Lei Zhang
Change-Id: I778085c6e21904e697d5899a93f4e4e9fca92478 Reviewed-on: https://pdfium-review.googlesource.com/c/44272 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-20Remove more unneeded STL #includes from headers.Lei Zhang
Remove some variables named "string" to avoid false positives from the linter. Change-Id: I00a53e6970451fd0cea8ab2f8178183650ca00d2 Reviewed-on: https://pdfium-review.googlesource.com/42810 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-17Rename CJS_Return to CJS_Result.Tom Sepez
"Return" is a verb, and "return" is a reserved-word at that, so avoid using it as part of a class name. Fully mechanical change apart from rename. Change-Id: I120e453e8ba001c4ab74a39e2da6aa6eb590835f Reviewed-on: https://pdfium-review.googlesource.com/40532 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-07-16Make JSGetObject<C>() return UnownedPtr<C>.Tom Sepez
This a convenient place to assert that the callback that is about to be invoked on the object doesn't destroy the object at any point during its execution. Change-Id: Iacb9d4e01603cc6bf316b00fdd062955c903ca5c Reviewed-on: https://pdfium-review.googlesource.com/37970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-11Check GetObjDefnID() in various JS functions.Lei Zhang
Consolidate all the checks into JSGetObject(), and add GetObjDefnID() methods for classes that are missing it. BUG=chromium:862059 Change-Id: I2c2b725a01dcd259ef712d2513fcf740cc410b15 Reviewed-on: https://pdfium-review.googlesource.com/37510 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-11Fix some nits in fxjs code.Lei Zhang
Change-Id: I533a702947ba371cbc7971d88a3b7dabbc81a298 Reviewed-on: https://pdfium-review.googlesource.com/37511 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-08Remove CJS_Object::InitInstance().Tom Sepez
Because constructors can do all this. Change-Id: I4f7ff6c26b17d9bddd326333a66e1bd38b2ea377 Reviewed-on: https://pdfium-review.googlesource.com/34693 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@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>