Age | Commit message (Collapse) | Author |
|
Change-Id: I190d27e79d62b9cae21b08ddfc1e422bbb37ab30
Reviewed-on: https://pdfium-review.googlesource.com/2969
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
JS Array Buffers are the first candidate to be allocated from
PartitionAlloc when it becomes available, so add test first.
Presently, we will return as large an array buffer as the system
can handle; this is generally a bad idea so limit them to 256MB
and test that we handle failure.
Change-Id: I205745a7938d69eb32ac883b90824f2f9e584ec7
Reviewed-on: https://pdfium-review.googlesource.com/3065
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56
Reviewed-on: https://pdfium-review.googlesource.com/3031
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
The fixes to RTFBreak to convert to a vector have fixed the memory
leak in these test files. Re-enable for asan and remove the asan hack
from the suppressor.
Change-Id: Id229d61101fdd2538b9bbc38b9364d694623da40
Reviewed-on: https://pdfium-review.googlesource.com/2937
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The one step to make an actual concrete class is conditionalized
in fpdfview and is unconditional in the fuzzer.
Also replace the clumsy C-style callbacks with a delegate
interface as long as we are making new interfaces.
Change-Id: I733a437483ce5e0c34211cfbbda05105336f55b5
Reviewed-on: https://pdfium-review.googlesource.com/2887
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The expected way to create native PDFium objects for JS is via
the NewFxDynamicObject() call in C++, but that doesn't mean that the
corresponding constructors won't be called from JS. In that case,
the internal fields will be uninitialized, and subsequent method
calls may try to use them.
Add a constructor callback for all PDFium objects that nulls out
these fields (shame that v8 doesn't do this by default, but probably
saves some cycles). Then ensure that we check for this possibility
in all the places it might turn up.
Conversely, if we've just gotten a successful return from
NewFxDynamicObject(), we know the CJS_Object/EmbedObj are good,
so avoid checking there.
BUG=695826
Change-Id: Iadad644c4af937def967ddc83daac1dad7544d69
Reviewed-on: https://pdfium-review.googlesource.com/2839
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The DrMemory bots have been removed, remove the config and infrastructure.
BUG=chromium:655521
Change-Id: I065d717b11d615a6dc981b79a8caefd8783b105b
Reviewed-on: https://pdfium-review.googlesource.com/2494
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ib319cad12707cf2a7211c64b0f950e5f0dd2b094
Reviewed-on: https://pdfium-review.googlesource.com/2493
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
When the results of the test runner were converted to return a tuple the
following code which checked the results for true/false were not updated
to extract the success value from the tuple. This caused the code to think
that the results always passed even when they failed.
This CL fixes the two tests which were broken (both just minor image result
differences) which slipped in during this breakage.
Change-Id: I01b56dd7b05013c2c12c83543746cf59b145e561
Reviewed-on: https://pdfium-review.googlesource.com/2456
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
We currently only limit the array recursion levels. This recursion
level may also be reset when parsing. This is insufficient to protect
against stack overflows.
BUG=681920
Change-Id: I69bd0c912fb45c0e68b9b9fa961d43f0adc9bdd3
Reviewed-on: https://pdfium-review.googlesource.com/2434
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=
Review-Url: https://codereview.chromium.org/2649313005
|
|
Currently we use the size provided by clusterfuzz when initializing the
css syntax parser. This maybe incorrect as the CFX_WideString may have a
different count after converting to UTF. Use the wide string length instead
of the provided size.
We need to guard against strings that convert to blank when doing the wide
conversion so add an early exit.
BUG=682551
Change-Id: I3e014647fcf869681098a1b4446306b8b3eb9323
Reviewed-on: https://pdfium-review.googlesource.com/2391
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL splits the files in xfa/fde/css into class per file and renames any
needed files to match the class names.
Update some of the classes to use std::stack.
Change-Id: I4eca0fb3556d949a15a873bb0f0fd732f47e4fb1
Reviewed-on: https://pdfium-review.googlesource.com/2253
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Moving to std::vector from the more forgiving CFX_ArrayTemplate
revealed the dubious page tree traversal, which depends on the
correctness of the /Count entries to properly summarize the total
descendants under a given node.
The only "correct" thing to do is to throw away these counts as parsed,
and re-compute them, perhaps in CountPages(). But I'm not willing to do
that since it may break unknown documents in the wild.
Pass out-params as pointers while we're at it.
BUG=680376
Review-Url: https://codereview.chromium.org/2636403003
|
|
This Cl removes the stream initializer from the FDE CSS parser. The only
consumer was the css fuzzer. The fuzzer has been moved to use the string
initializer to match the rest of the code.
Change-Id: I65445af1159058b7c71d5e1d7c12e60383da6dbd
Reviewed-on: https://pdfium-review.googlesource.com/2217
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This will land after this CL
https://chromium-review.googlesource.com/c/424575/
as a way of making sure it works as intended.
TBR=borenet
BUG=skia:5973
Review-Url: https://codereview.chromium.org/2629943002
|
|
A return of ID == 0 from the embedder means the timer was not
created (see public/fpdf_formfill.h), although few embedders
actually conform to this convention.
Firing a timer with ID == 0 will thus do nothing since there can't
be such a timer in the map.
BUG=679649
Review-Url: https://codereview.chromium.org/2626863003
|
|
In this case, we observe the destruction of the object, but have
unfortunately saved a pointer to it in a local variable.
BUG=679643
Review-Url: https://codereview.chromium.org/2628233002
|
|
This patch adds the additional functions required to make postscript
printing functional. The most significant additions are are two added
compression functions and a new API for setting the postscript level.
Not currently called from Chromium, Chromium patch to come.
BUG=
Review-Url: https://codereview.chromium.org/2612243005
|
|
This CL updates the possible FDE CSS enums to enum classes and fixes up any
instances of incorrect values being used. A few other cleanups and changes
were needed to complete the conversion.
Change-Id: Ibcca5229a9ca8de1f4beb6462535f61705fd4f8c
Reviewed-on: https://pdfium-review.googlesource.com/2170
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Widgets as returned from GetWidgets() can pop out of existence
unexpectedly, so always return observed pointers. This extends
the same pattern used elsewhere in the file to all occurrences.
BUG=679642
Review-Url: https://codereview.chromium.org/2624933002
|
|
I also made the call to set the flags occur before the Initialize()
call, as this appears to be the pattern elsewhere in our codebase.
Review-Url: https://codereview.chromium.org/2627563003
|
|
Extends the PDFium tests to collect images and meta data to be uploaded
to Gold. This feature is triggered by adding the --gold_* flags.
It extends pdfium_test to output the MD5 hash of the underlying pixel
buffer for each page it renders.
That output is then processed by test_runner.py to generate the
gold meta data.
This behavior is modeled after the 'dm' tool in skia. See
https://skia.googlesource.com/skia/+/master/dm/DM.cpp#1090
This should not cause any change in the current behavior of the tests,
it will be trigger once we update the buildbot recipe.
BUG=skia:5973
Review-Url: https://codereview.chromium.org/2578893004
|
|
BUG=pdfium:644
Review-Url: https://codereview.chromium.org/2581873002
|
|
Also rename CFDE_XMLParser to IFDE_XMLParser since its an interface.
Review-Url: https://codereview.chromium.org/2555373002
|
|
IFGAS_Streams are not part of the IFX_Stream hierarchy, but
can be made from such.
Review-Url: https://codereview.chromium.org/2559763002
|
|
Originally the key "T" was checked which was not correct since that
key is optional. Now change to check "FT" as well as its parent's
key since this key is also inheritable.
BUG=chromium:440132
Review-Url: https://codereview.chromium.org/2554223002
|
|
We can remove a lot of "bOwnsStream" logic in the process.
Always pass these by const reference, in case the called method
wants to hang on to the stream (one exception is where we stick
a raw pointer into a void* slot in a context from another layer).
Review-Url: https://codereview.chromium.org/2451493002
|
|
This updates test.gni to match chromium as of
crrev.com/d29ecfa7dc3ed49a2a49002ab941adb57c53e923, changes how
PathService::GetSourceDir behaves on Android, and specifies the runtime
test data for test_support.
BUG=pdfium:415
Review-Url: https://codereview.chromium.org/2541503002
|
|
It's a separate hierarchy unrelated to the IFX_*Stream classes.
Also rename CFX_Stream to CFGAS_Stream, and so forth.
Review-Url: https://codereview.chromium.org/2535723010
|
|
Change-Id: I6b2d1a5b06211b32f3053aad4d7ae7501ec8d8f6
Reviewed-on: https://pdfium-review.googlesource.com/2093
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Also remove a bool that is always false.
Review-Url: https://codereview.chromium.org/2539203002
|
|
BUG=pdfium:568
Review-Url: https://codereview.chromium.org/2519343002
|
|
BUG=pdfium:479
Review-Url: https://codereview.chromium.org/2521843003
|
|
Add cpdf_streamparser.h and cpdf_contentparser.h since there are
already corresponding .cpp files with the same name.
Review-Url: https://codereview.chromium.org/2521123003
|
|
Return these from underlying methods as appropriate.
Review-Url: https://codereview.chromium.org/2520133002
|
|
BUG=chromium:667012
Review-Url: https://codereview.chromium.org/2508203007
|
|
Review-Url: https://codereview.chromium.org/2514173002
|
|
It passes on Linux bots.
Review-Url: https://codereview.chromium.org/2516133003
|
|
This picks up many Mac expectation files, though not all Macs render
them the same way. This also adds a new "jetman_std" test case.
All the failures on Mac are suppressed.
BUG=pdfium:626
TBR=npm@chromium.org
NOTRY=true
Review-Url: https://codereview.chromium.org/2516133002
|
|
Some changes were required to match underlying ctors
as invoked by the templated methods.
Many release() calls go away, a few WrapUniques() are
introduced to avoid going deeper into other code.
Review-Url: https://codereview.chromium.org/2510223002
|
|
BUG=
Review-Url: https://codereview.chromium.org/2498223005
|
|
There's a path out that deletes a pointer whose ownership
was passed off earlier. This will get simpler once more
APIs take unique_ptr.
BUG=664284
Review-Url: https://codereview.chromium.org/2495003006
|
|
- Add a template for fuzzers to remove redundancy.
- Sort fuzzers in alphabetical order.
Previous attempt: https://codereview.chromium.org/2480043002/
Review-Url: https://codereview.chromium.org/2481933003
|
|
TBR=tsepez@chromium.org
Review-Url: https://codereview.chromium.org/2477323004
|
|
My OCD insists that classes be named after nouns, and "linearized"
feels like an adjective.
Remove a redundant "if" while at it.
Review-Url: https://codereview.chromium.org/2482973002
|
|
Unify some code
Move parsing of linearized header into separate CPDF_Linearized class.
Original review:
https://codereview.chromium.org/2466023002/
Revert review:
https://codereview.chromium.org/2474283005/
Revert reason was:
Breaking the chrome roll.
See https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/331856
___
Added Fix for fuzzers.
Review-Url: https://codereview.chromium.org/2477213003
|
|
of https://codereview.chromium.org/2480043002/ )
Reason for revert:
Breaking the tree:
https://build.chromium.org/p/client.pdfium/builders/windows_xfa_32/builds/619/steps/compile%20with%20ninja/logs/stdio
Original issue's description:
> Compile fuzzer sources in standalone builds.
>
> - Add a template for fuzzers to remove redundancy.
> - Sort fuzzers in alphabetical order.
>
> Committed: https://pdfium.googlesource.com/pdfium/+/470b5fa8f8dbfd2aa702d9d8cfdc03a7b486b374
TBR=dsinclair@chromium.org,thestig@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2480323002
|
|
- Add a template for fuzzers to remove redundancy.
- Sort fuzzers in alphabetical order.
Review-Url: https://codereview.chromium.org/2480043002
|
|
This is a generic API function to retrieve any viewer preference of type
name.
BUG=pdfium:414
Review-Url: https://codereview.chromium.org/2475923003
|