Age | Commit message (Collapse) | Author |
|
BUG=pdfium:690
Change-Id: I922279e4bdc8b411f47f49798155e8f9118c1396
Reviewed-on: https://pdfium-review.googlesource.com/6552
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL fixes some nits in fpdf_parser_decode, especially avoiding non-const
reference parameters.
Change-Id: Ibb914850afd924bb398f886ac862f7589519ef7e
Reviewed-on: https://pdfium-review.googlesource.com/6750
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
PDFium's vswprintf() is based on the win32 version to be consistent
across platforms. On Windows, %s has different meanings depending on
whether the printf() variant is wide or not.
BUG=chromium:732533
Change-Id: I7437ecd253da1234728c1e0897f02b7f907aada8
Reviewed-on: https://pdfium-review.googlesource.com/6550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL adds ExtractCountDigits and ExtractCountDigitsWithOptional to
cleanup the digit extraction code.
Change-Id: I6c3f4b435ec41b429b18cd9af9be46551a7fa391
Reviewed-on: https://pdfium-review.googlesource.com/6391
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL updates CFGAS_FormatString to use the FXSYS_DecimalCharToInt
helper instead of doing the conversion itself.
Change-Id: Ia5b0f0c008a815b4cf25e59281357285005a7ab0
Reviewed-on: https://pdfium-review.googlesource.com/6412
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL adds a small helper to convert a number to a string with a given
number of leading digits.
Change-Id: I689c0d1ab9d35341f923ac7b72ed5a96bce6b868
Reviewed-on: https://pdfium-review.googlesource.com/6411
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL continues combining CFGAS_FormatString code chunks which are
very similar.
Change-Id: Ie2d41ce4c9cc82716daafbe346d0e71ba971f2bc
Reviewed-on: https://pdfium-review.googlesource.com/6410
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the use of FXBSTR_ID and uses CFX_WideString
comparisons instead. This makes the code a bit clearer as to what is
being compared.
Change-Id: I933bd1d7c98800ac80849d6f4d3179dd342f6270
Reviewed-on: https://pdfium-review.googlesource.com/6371
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL combines the similar format strings together and checks for the
' 's conditionally where needed.
Change-Id: I46b2227c9d76ba66c8526c6597684e4b47301bde
Reviewed-on: https://pdfium-review.googlesource.com/6370
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL fixes the solar days calculation for months after August.
Simplifies the minute rounding method.
Change-Id: I5f335338ecac911ef0ab57602f41bb98c6f9fa6c
Reviewed-on: https://pdfium-review.googlesource.com/6331
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ied2a169a3e7e9b178d746b04c67286d7a51fa635
Reviewed-on: https://pdfium-review.googlesource.com/6330
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL changes all CFGAS_FormatString methods to use pointer out
paramters instead of reference out parameters.
Change-Id: Ic5b57f30e4be09233898b8f4e06f908a96afedc8
Reviewed-on: https://pdfium-review.googlesource.com/6272
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL adds tests for the numeric, text, null and zero parsing and
formatting methods.
Change-Id: I0a35de105fd631598a7885c4bbbd1c2abbbd4260
Reviewed-on: https://pdfium-review.googlesource.com/6271
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds some more time tests for CFGAS_FormatString.
Change-Id: Ida7d9e665f304b984508ff3b404e7ea9c38ef415
Reviewed-on: https://pdfium-review.googlesource.com/6270
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds more tests for various CFGAS_FormatString methods. A few
bugs are fixed up along the way.
Change-Id: Ida1f2792d1bd72f4f52b3c7cc1ff0022b6f45fda
Reviewed-on: https://pdfium-review.googlesource.com/6179
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds tests for the date parsing and formatting code in
CFGAS_FormatString.
Change-Id: I9989cdd1b3f92c90d46ee2c3f7838fe1de255be2
Reviewed-on: https://pdfium-review.googlesource.com/6178
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes some unused locale related code and formats other bits.
Change-Id: I172fc16a634a8982c00bfaf84fdcd4cd277eb36d
Reviewed-on: https://pdfium-review.googlesource.com/6077
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I3fe0460f3a4cfd7d48ccfc79d0256fc83d7fbac8
Reviewed-on: https://pdfium-review.googlesource.com/6235
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I96c3429dbe2c572ed409706adfe3707b8b9bf51b
Reviewed-on: https://pdfium-review.googlesource.com/6176
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
CXFA_FM2JSContext and CXFA_Object both subclass CFXJSE_HostObject.
When a CFXJSE_HostObject is obtained from an opaque pointer inside
a V8 object internal slot, there is no way to distinguish one from
the other.
Bug: 728158
Change-Id: Iabc648e8b7226e2819d8795227442c3f6c61a793
Reviewed-on: https://pdfium-review.googlesource.com/6211
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes unused code from CFGAS_FormatString and
CXFA_LocaleValue.
Change-Id: I87a996231b3ad3770508be362456c435034b229c
Reviewed-on: https://pdfium-review.googlesource.com/6177
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL splits the remaining files in xfa/fxfa/app into individual files
named after the classes.
Change-Id: I84bd8938937641bb6897614ed15558a2682f456c
Reviewed-on: https://pdfium-review.googlesource.com/6010
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Sed + minimal conversions to compile, including moving some
constructors into the .cpp file. Any that caused ASAN issues
during the tests were omitted rather than trying to resolve
the underlying issue.
Change-Id: I00a421f33b253eb4071ffd9af3f2922c7443b335
Reviewed-on: https://pdfium-review.googlesource.com/5891
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This Cl fixes the return type of the Round method to return a double instead
of a string.
Change-Id: I740e375bdedfe22cb9f81d4beeaa079eac64b1bd
Reviewed-on: https://pdfium-review.googlesource.com/5896
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL updates the return type of the remaining boolean tests to be Integer
and enables the tests.
Change-Id: Ie2856ad31d17ffb496f33e6969912d0aae9678c5
Reviewed-on: https://pdfium-review.googlesource.com/5895
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl fixes the Exists test of FM2JSContext to handle the return type of
Integer instead of Boolean.
Change-Id: I51c43e22eff5330de5ab5e63a925006af483f0ab
Reviewed-on: https://pdfium-review.googlesource.com/5894
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl enables the Choose tests for FM2JSContext. The Choose tests always
return a String.
Change-Id: I29b3ce4ed38f94886c6036f3766182fecb6e787b
Reviewed-on: https://pdfium-review.googlesource.com/5893
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL enables most of the FM2JSContext boolean tests. The return type is
updated to Integer from Boolean.
Change-Id: Ie3f665bd23a86e843cadb2ae8963767466bd1714
Reviewed-on: https://pdfium-review.googlesource.com/5892
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I4eab5e843580845753c5f80c05cf9490a85114b6
Reviewed-on: https://pdfium-review.googlesource.com/5890
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds tests for the FormCalc methods that don't require passing in a
formcalc object reference.
Change-Id: Ica6f15704cce525d38d25a27d1628089d2fc5a5a
Reviewed-on: https://pdfium-review.googlesource.com/5691
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ie591de17aba54d6d0f96b1133be7d899bab577cf
Reviewed-on: https://pdfium-review.googlesource.com/5660
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I88466943171f19259f84add69679741d44c8e123
Reviewed-on: https://pdfium-review.googlesource.com/5551
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
CFGAS_GEFonts are ref counted, and its a good thing since they
are managed by at least three different font managers:
CFGAS_FontMgr, CXFA_PDFFontMgr, and CXFA_FontMgr. None of these
have a clear claim to ownership of the CFGAS_GEFont.
CFGAS_GEFont has back-pointers to two of these, CFGAS_FontMgr, and
CXFA_PDFFontMgr, and they could each outlive the other. Thus the
font needs to watch for destruction of either of its managers, so
as to stop using it after its gone.
Bug: 724640
Change-Id: I907ec35e300e11e532e13545d51fb200ac86b4f9
Reviewed-on: https://pdfium-review.googlesource.com/5735
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
There's an unique_ptr going in the other direction, so it must outlive this.
Change-Id: I28a77fbff67e6682360414e26c807d707602e140
Reviewed-on: https://pdfium-review.googlesource.com/5736
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Corner case for StringCs: A non-referenceable ptr plus a
zero length.
The situation should be rare, so fix it at the spot of the
foul rather than adding logic to the StringC constructors to
zero the pointer when encountering zero length.
Bug: 724500
Change-Id: I54b263f7db5ddef7bade6bfaa185a542ea20229c
Reviewed-on: https://pdfium-review.googlesource.com/5730
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
More straight forward than CFX_GEModule owning in and CPDF_ModuleMgr
holding a pointer to it.
Remove assumptions that the codec modules may return nullptr, and do
IWYU.
Change-Id: Iba7fc3c7ec223fd6d29a1ab74ed13d35689bc5d5
Reviewed-on: https://pdfium-review.googlesource.com/5654
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change interform to avoid temp StringC with dangling ptr.
Change-Id: I8d8659973bcdf2cdbcaa6efa6012e4acce5f1604
Reviewed-on: https://pdfium-review.googlesource.com/5571
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This Cl adds the basis of the test framework to execute the javascript
produced by CXFA_FM2JSContext and verify the results are correct.
Change-Id: Ie46625b7e27ca0808e9cc41fdc00b7c0a212837d
Reviewed-on: https://pdfium-review.googlesource.com/5651
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl removes the CXFA_FMErrorInfo class. The message was never output, just
used as a flag to determine if there was an error. The class has been replaced
with a boolean.
Change-Id: I1cde99ce6957f5f8c6be0755a198d80ec8378b3a
Reviewed-on: https://pdfium-review.googlesource.com/5653
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl shortens the prefix applied in JavaScript to reduce the size of
the generated JavaScript string.
Change-Id: Ica5d02cc89b17140ba42deae72484cd159f8e3e5
Reviewed-on: https://pdfium-review.googlesource.com/5590
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds the beginning of unittests for the CXFA_Parse code.
Change-Id: I06e556f1a35405bc683c536d390071917ee330a6
Reviewed-on: https://pdfium-review.googlesource.com/5556
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Most files match the contents. The expression files are named to match
their base type even though they contain all the expression
subclasses.
Change-Id: I3b7705c7b206a9fa1afae8b677f765e8b788e84d
Reviewed-on: https://pdfium-review.googlesource.com/5492
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
In particular, prefer an explicit .release() call when handing
ownership of an object to a caller across a C-API.
Change-Id: Ic3784e9d0b2d378a08d388989eaea7c9166bacd1
Reviewed-on: https://pdfium-review.googlesource.com/5470
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
So remove it.
But they probably wanted it to be true in one place, because
it looks like a leak. So find a better way to own the object.
Change-Id: I15937e29da5ce8b380f82cb20ee3ecc3f49b8ca3
Reviewed-on: https://pdfium-review.googlesource.com/5473
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
There are places where an object "child" has a raw pointer
back to object "owner" with the understanding that owner will
always outlive child.
Violating this constraint can lead to use after free, but this
requires finding two paths: one that frees the objects in the
wrong order, and one that uses the object after the free. The
purpose of this patch is to detect the constraint violation
even when the second path is not hit.
We create a template that is used in place of TYPE*. It's dtor,
when a memory tool is present, goes out and probes the first
byte of the object to which it points. Used in "child", this
allows the memory tool to prove that the "owner" is still alive
at the time the child is destroyed, and hence the constraint is
never violated.
Change-Id: I2a6d696d51dda4a79ee2f00a6752965e058a6417
Reviewed-on: https://pdfium-review.googlesource.com/5475
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Limit the length of error messages to avoid string formatting failure.
Simplify some CXFA_FMParse error handling code too.
BUG=chromium:708428
Change-Id: I2f5fdb61349a90b3ba681dcc04a26ce0d7f2bdda
Reviewed-on: https://pdfium-review.googlesource.com/5331
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL adds tests for CXFA_FMLexer.
Change-Id: I4cb7000212dda6d2b32211005a1c22deabb813ae
Reviewed-on: https://pdfium-review.googlesource.com/5554
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Update return types to be bools instead of ints. Make some methods private.
Change-Id: I5d55c48a861f90e9bd116ef835c11cdb515002a6
Reviewed-on: https://pdfium-review.googlesource.com/5553
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
The fm2js code takes a pointer to the input string and then walks along
that pointer. There are currently no checks to verify we haven't walked
off the end of the pointer into random memory.
If this happens, we can end up allocating large chunks of memory and
copying random bits.
BUG=chromium:721533
Change-Id: Ia61fe96c1ff9eb9ded63cf8326b7be44986bd9e1
Reviewed-on: https://pdfium-review.googlesource.com/5550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Remove the inc/dec/get methods that aren't helpful. Change methods to
return void instead of uint32_t and make sure they set the proper error
messages.
Change-Id: I741316e7990a776d528625f34fd941316c524c15
Reviewed-on: https://pdfium-review.googlesource.com/5530
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|