Age | Commit message (Collapse) | Author |
|
Clean up another ten bare |new|s or so.
Change-Id: If32b307e5edd844488dfb2020e710214bb6f75a0
Reviewed-on: https://pdfium-review.googlesource.com/42550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: If577500905f5bc5bb631718e9c87aa03ee6bee5a
Reviewed-on: https://pdfium-review.googlesource.com/41571
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I11772d2826ca23e8a07fef43a4fa50ead83292be
Reviewed-on: https://pdfium-review.googlesource.com/41430
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ib93972d3162c37995dfc215d1043e0e1b4220610
Reviewed-on: https://pdfium-review.googlesource.com/41410
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I15b191114a0c464264deccf60f3ae5da287e5a0b
Reviewed-on: https://pdfium-review.googlesource.com/41390
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also for CFXJSE_Arguments.
Change-Id: I15bfa4e09675bb48aecfa0c55539bf8dc50675e6
Reviewed-on: https://pdfium-review.googlesource.com/41370
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I7ed3037d8d8862787ad7364eb5f55cd22eb879ad
Reviewed-on: https://pdfium-review.googlesource.com/41357
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
In CFXJSE_Engine::ResolveObjects(), all the calls are to the same
object. Just grab a pointer and reuse that. Also make GetNodeHelper()
non-const.
Change-Id: I92a0bb1577a11d4d067e6d9beed27fcadeb694dc
Reviewed-on: https://pdfium-review.googlesource.com/41573
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I600013bcbf44661fd132ce786bcd08980a7ecd4e
Reviewed-on: https://pdfium-review.googlesource.com/41572
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also merge Initial() into the ctor.
Change-Id: Ib3cb9619a65a5c33d7c739051c13dfcd7f2324d7
Reviewed-on: https://pdfium-review.googlesource.com/41356
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Fix nits in affected files.
Change-Id: I3a0363c9b7c28359fd1c7cea305e4f7705a228c2
Reviewed-on: https://pdfium-review.googlesource.com/41355
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I6fd6004cb6c2e5a801fce0fbb43a6f7d65f560dd
Reviewed-on: https://pdfium-review.googlesource.com/41354
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
console.show() and console.println() are calls commonly found in XFA
scripts. This CL adds methods to the built-in V8 console so these calls
do not stop the rest of script from running.
Bug: chromium:872893
Change-Id: I661f505176884558ae2d658312d561a28767ae25
Reviewed-on: https://pdfium-review.googlesource.com/41533
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Then revert the ones that break compilation.
Fix one IWYU noticed during presubmit.
Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7
Reviewed-on: https://pdfium-review.googlesource.com/41470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Rename GetObject() to GetArray() and remove more ToArray() calls.
Change-Id: I754ca72b32c085e1801d3cedcd291ce4d2682359
Reviewed-on: https://pdfium-review.googlesource.com/41353
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL fixes instances of variable shadowing that are
discovered by turning on -Wshadow.
BUG=pdfium:1137
Change-Id: I418d50de89ecbeb12e85b23a358bc61e8f16e888
Reviewed-on: https://pdfium-review.googlesource.com/41150
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
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>
|
|
Change-Id: I4420fbf7402a8b08e33ca525e98690643d59efdf
Reviewed-on: https://pdfium-review.googlesource.com/40930
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
These parameterless methods are deprecated since the Isolate is
inferred from the memory address of the object being converted to a
string which will soon not be reliable. As such these method will be
removed in the very near future.
Bug: v8:7786
Change-Id: Idbcd56a633c3b0b06ba8e60909fc0fb9c80f3410
Reviewed-on: https://pdfium-review.googlesource.com/40310
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
|
|
"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>
|
|
Avoid the possibility of ever re-introducing the issue noticed
last week.
Remove some redundant JSGetStringFromID() calls.
Change-Id: I56687c2191bd72e378f747083f34080e50cbe490
Reviewed-on: https://pdfium-review.googlesource.com/40490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Conformity with standards.
Change-Id: Ia718700526477fd1826eb4900ab333ebf4c8a517
Reviewed-on: https://pdfium-review.googlesource.com/40353
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Adds clarity to the call sites.
Change-Id: Id4deed9adda2ad79f0847d618792429044d4f7d6
Reviewed-on: https://pdfium-review.googlesource.com/40351
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Non-consecutive mode has questionable correctness and is not an obvious
performance win.
Change-Id: Idaa66e5ee5c4604628a0f55b67d5a04ab47ea5ec
Reviewed-on: https://pdfium-review.googlesource.com/40050
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
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>
|
|
Change-Id: Ie0e8e83e0380c323d8d12e82e50126b85d34405c
Reviewed-on: https://pdfium-review.googlesource.com/40191
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bring in line with standards.
Remove argument entirely for mac code that is always nullptr.
Change-Id: I0710bdbd51fc0bc2e1d428ef44976be39a631147
Reviewed-on: https://pdfium-review.googlesource.com/40091
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Replaces them with calles to the proxy function, FXSYS_time, so that
tests may use a stable time value instead of the wall clock value.
BUG=pdfium:1104
Change-Id: I4743c4634f56d4a6cba1f1130c4562a35cee1887
Reviewed-on: https://pdfium-review.googlesource.com/39853
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds a proxy, FXSYS_time, for the time syscall, so that a
testing mechanism can be implemented. Specically there is now a flag
for pdfium_test, --time=, that allows setting the time since the epoch
that will be returned. This plumbed all the way down into the proxy
and allows for stable results for tests that depend on getting the
current time.
There are other places in the code base that will need to be patched
like this, that will be dealt with in follow on CLs.
BUG=pdfium:1104
Change-Id: I2de185f8d47abe46704dd579c13a54948b7f81e0
Reviewed-on: https://pdfium-review.googlesource.com/39750
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Turns out that "FromUnicode" is misleading in that, on linux, it simply
removes any characters beyond 0xFF and passes the rest unchanged, so
no unicode decoding actually takes place. On Windows, it passes it into
the system function specifying FX_CODEPAGE_DefANSI, converting it into
the so-called "default ANSI code plane", passing some characters,
converting others to '?' and still others to 'A'. Either way, nothing
resembling UTF8 comes out of this, so pick a better name.
These now immediately look suspicious, so a follow-up CL will see
which ones should really be WideString::UTF8Encode() instead.
Making this a normal method on a widestring rather than a static
method on a bytestring feels more natural; this is parallel to
the UTF8Encode and UTF16LE_Encode functions.
Add a test that shows these conversions.
Change-Id: Ia7551b47199eba61b5c328a97bfe9176ac8e583c
Reviewed-on: https://pdfium-review.googlesource.com/39690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
No need for variadic printf-like functions, since callers can cobble
arguments into a string much more simply.
Change-Id: I0e8d6f6a55a3715ef9d5c6940b73ce8bb2220a1a
Reviewed-on: https://pdfium-review.googlesource.com/39611
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Avoid possibility of an unterminated string or nullptr by avoiding
stringviews, since the non-view classes copy and always provide
a suitable result. Always use %ls and widestrings in wprintf()
variants, since that combination is consistent across our platforms
(%s, %S, etc. have idiosyncracies).
Bug: 870952
Change-Id: Ief62a42c3486e8298f9583b56e9333db1a74972a
Reviewed-on: https://pdfium-review.googlesource.com/39551
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Fix some nits as well.
Change-Id: Iaef79056b68ea0dae7f76c09e7a133cc545896fd
Reviewed-on: https://pdfium-review.googlesource.com/39353
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Return results instead of writing them to an out parameter. Remove start
index which is always 1.
Change-Id: I4b969a1e27679fca56b2cde1a901a8967c7fa8ce
Reviewed-on: https://pdfium-review.googlesource.com/39092
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Also remove a check that is always false, and simplify another check.
Change-Id: I89193eebc84a6fd139b34b890a8c3003a635851b
Reviewed-on: https://pdfium-review.googlesource.com/39091
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Make consistent with other public API types.
Introduce CPDFSDKFormFillEnvironmentFromFPDFFormHandle() and
FPDFFormHandleFromCPDFSDKFormFillEnvironment() helper functions.
Use these to kill off some casts in the process.
Change-Id: I6230ecdb4cecd03076f5e24c8cc49c45ad694da7
Reviewed-on: https://pdfium-review.googlesource.com/39250
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
They are only used inside CFXJSE_FormCalcContext. Move into an anonymous
namespace.
Change-Id: Ib8a0ff9b90cf951459c04655bedada3bdb1979a4
Reviewed-on: https://pdfium-review.googlesource.com/39090
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Return a std::pair instead of having a non-const ref out parameter. Use
early returns / continues to simplify code.
Change-Id: I093fe667d31447ed42b8d44e354405094adaf8fd
Reviewed-on: https://pdfium-review.googlesource.com/39070
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also fix C++ style errors.
Change-Id: Ia4b815c2fa8430791bb44a218ef93f8efde8c3af
Reviewed-on: https://pdfium-review.googlesource.com/39050
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Instead, move the methods to the subclass where they belong.
Fix IWYU in CJX_Object.h to fix compilation.
Change-Id: I4c71f28235b9cf5000e9ddaf33d6602baf22205f
Reviewed-on: https://pdfium-review.googlesource.com/39170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3fdc6d473f08835b6caeacbbd583bb651a9c5678
Reviewed-on: https://pdfium-review.googlesource.com/39111
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
It makes illegal casts and requires its callers to double-check the
type validity of results before use. Instead, use the parent
class iterator and perform checked casts.
No functional difference, since it looks like the requisite checks
were being made in all places.
Make one "using" visible to other files to save some verbosity.
Change-Id: I894ca15b4bdddd4723b787663950a58bc58b7f06
Reviewed-on: https://pdfium-review.googlesource.com/39030
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
XFA introduces some additional subclasses, so it doesn't hurt
to be sure in all cases before making a static cast.
Change-Id: I7447ca58be0b57201b39ba40a3fc5f47505cee58
Reviewed-on: https://pdfium-review.googlesource.com/39013
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Because we don't want to trust anything V8 gives us back.
Use a deep namespace so we can have a short declaration in the
structs, but avoid collisions.
Change-Id: Ibb832a5dcd34c652159c3343dd70c9e2ee561537
Reviewed-on: https://pdfium-review.googlesource.com/38972
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Introduces checks in a few new places, but mainly just consolidates
checking/casting logic.
Change-Id: I634a03060d254db099972c6978249992367e146c
Reviewed-on: https://pdfium-review.googlesource.com/38900
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Part of the effort to reduce unchecked static casts.
Change-Id: I1bff1c53aa7c5804660de4b65cf01523d70fcbb7
Reviewed-on: https://pdfium-review.googlesource.com/38896
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Value::ToString is deprecated since the Isolate is inferred from the
memory address of the object being converted to a string which will soon
not be reliable. As such this method will be removed in the very near
future.
Change-Id: I1e5a1a0464f2052cc3aa5eeb1ddbdb7b0a9222d3
Reviewed-on: https://pdfium-review.googlesource.com/38914
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
|
|
And use it in place of ASSERT() that the type was correct. Since we
can check it, doing so at runtime may help avoid type confusion, and
we'll get a nice safe SEGV if the asserted condition ever fails.
Change-Id: I46b65a4b70e819a670d7cad7966e0d100f0d9a63
Reviewed-on: https://pdfium-review.googlesource.com/38810
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Because the other helpers are declared here.
Rename VariablesThis to ThisProxy in a few places; VariablesThis is
a slightly different concept (see GetVariablesThis()).
Then introduce helper for CXFA_List subclass as well.
Remove unused const version of some helpers.
Change-Id: Ia328d8cd170a8b97015e98c1c770fa8a44810455
Reviewed-on: https://pdfium-review.googlesource.com/38670
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Do not allow instanceManager methods to run in Foreground XFA forms.
They are static, and their widgets should not be inserted or removed.
See "XML Forms Architecture (XFA) Specification Version 3.3", page 272.
Bug: chromium:860697
Change-Id: Ia96834e085ee508618ca4dcb2bd5271466369ede
Reviewed-on: https://pdfium-review.googlesource.com/38751
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|