Age | Commit message (Collapse) | Author |
|
Doing so reveals places where there are needless copies
and conversions.
Change-Id: I24a868d40aa63836f4167eaf4541964049df7916
Reviewed-on: https://pdfium-review.googlesource.com/2555
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Move checks performed as part of JS_Value's object and array
handling back into FXJS, to ease removal of JS_Value in the future.
Remove some convenience routines in FXJS for objects, to shrink
API to be covered during testing.
Change some naming (number => double, string => widestring) to
make it clearer when there is a C++ type involved.
BUG=
Review-Url: https://codereview.chromium.org/2637503002
|
|
This CL removes the use of FX_Alloc and any remaining new'd CFXJSE_Value objects
from CXFA_FM2JSContext and replaces them with unique_ptrs and vectors.
Change-Id: I30ba697d65ee326d2faa895c3217bdc407419298
Reviewed-on: https://pdfium-review.googlesource.com/2157
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The -build/include setting was masking out build/include_what_you_use. This CL
restores them, fixes any build errors, and adds NOLINT as needed. As well,
the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd.
lint cleanups
Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f
Reviewed-on: https://pdfium-review.googlesource.com/2030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
FX_BOOL was a type just like a regular C++ bool, except that it
took 4x the space and frequently was used to hold values besides
true or false.
Review-Url: https://codereview.chromium.org/2471353002
|
|
This reverts commit a282c7380f3964de41ea93c9980b12c4513d3473.
This CL changes CPDFXFA_App from a global object to a child of the
CPDFXFA_Document objects.
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2421603002
|
|
https://codereview.chromium.org/2418653003/ )
Reason for revert:
https://build.chromium.org/p/client.pdfium/builders/linux_xfa_asan_lsan/builds/117/steps/corpus%20tests/logs/stdio
Original issue's description:
> Reland: Make the CPDFXFA_App non-global
>
> This reverts commit b685e6471075bebd26711bc183de3128f54932e3.
>
> This CL changes CPDFXFA_App from a global object to a child of the CPDFXFA_Document objects.
>
> BUG=pdfium:623
>
> Committed: https://pdfium.googlesource.com/pdfium/+/f3736bca5f874b0889c5906ffbd74a405089f671
TBR=tsepez@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2414883006
|
|
This reverts commit b685e6471075bebd26711bc183de3128f54932e3.
This CL changes CPDFXFA_App from a global object to a child of the CPDFXFA_Document objects.
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2418653003
|
|
https://codereview.chromium.org/2416753002/ )
Reason for revert:
https://build.chromium.org/p/client.pdfium/builders/linux_xfa_asan_lsan/builds/112/steps/embeddertests/logs/stdio
msan is sad.
Original issue's description:
> Make the CPDFXFA_App non-global
>
> This CL changes CPDFXFA_App from a global object to a child of the
> CPDFXFA_Document objects.
>
> BUG=pdfium:623
>
> Committed: https://pdfium.googlesource.com/pdfium/+/abefb79577b32d291d14d7e01a70f6f8cf213bd3
TBR=tsepez@chromium.org,thestig@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2412903004
|
|
This CL changes CPDFXFA_App from a global object to a child of the
CPDFXFA_Document objects.
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2416753002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2380713005
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2382723003
|
|
Use smart pointers for FXJS_PerIsolateData owned member variables. Also
move creation and deletion of dynamic object map into
FXJS_PerIsolateData's constructor and destructor. Overall, the
interfaces and memory management should be simpler.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2358343002
|
|
CFXJS_Engine class should always be constructed with an isolate, except
for its subclasses which may need to create an isolate by themselves.
Move SetIsolate() function to be protected so that only subclasses can
access it.
Review-Url: https://codereview.chromium.org/2354353002
|
|
Per isolate runtime data should be deleted when the associated
isolate's destructed.
Also, the internal of per isolate runtime data is obscure to the JS
engine. So XFA or this class itself has to be in charge of the memory
management. Use smart pointer for it so that the resource
could be released properly.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2354923003
|
|
When setting a new value for a V8 object property, the passed along
pointer of CFXJSE_Value is only used, but needs to be released by the
original owner. Use unique_ptr to have the pointer released
automatically.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2328273004
|
|
The array buffer allocators are allocated and owned by pdfium code,
they should be deleted properly after the corresponding isolates are
disposed.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2254123004
|
|
Nearly all the "loose" functions in FXJS become methods on
the CFJXS_Engine.
This is the "missing link" wrt some layering violatons that
have been around forever. We can stop passing &m_ variables
from CJS_ down into FXJS Initialization as a result.
Review-Url: https://codereview.chromium.org/2245863002
|
|
Create a new class to hold these, CFXJS_Engine (could have been
called Runtime, but there are too many "Runtimes" already). In a
subsequent patch, all the FXJS_*() functions that take an isolate
as the first argument can become methods on the engine.
CJS_ must still manage the isolates; this happens outside
the engine.
The IJS_Runtime abstraction moves up to fpdfsdk/javascript; it
remains to allow for either a real JS library or a stubb one to
be linked (for non-js builds).
Review-Url: https://codereview.chromium.org/2241483004
|
|
Analogous to getting the length of JS array, this result
should be a C++-side object only.
Also rename to FXJS_GetObjectProperty to match JS nomenclature.
Review-Url: https://codereview.chromium.org/2242593002
|
|
Also get rid of FXJS_ValueCopy() while we're at it.
BUG=pdfium:556
Review-Url: https://codereview.chromium.org/2215093002
|
|
Review-Url: https://codereview.chromium.org/2154503002
|
|
v8::Object::Clone() is deprecated, and gets us into trouble with
some corner cases. Create a new handle to the same object instead.
Remove FXJS_NewObject() and FXJS_NewObject2(), and replace with
direct assignments. Pass isolate to FXJS_NewNull() while were
at it, even though not needed, for consistency with all remaining
FXJS_New*() calls.
BUG=628106
R=jochen@chromium.org
Review-Url: https://codereview.chromium.org/2151023002
|
|
This CL moves the fpdfsdk/sjapi code info fxjs/. The "fxjs" library is moved
from being XFA specific to being compiled if V8 is enabled.
The fxjs_v8 files are required when building for XFA (they have XFA defines
in them) and are used in CFXJS_RuntimeData. The cfxjse_* files are only added
if XFA is also enabled.
Review-Url: https://codereview.chromium.org/2144603003
|
|
This Cl moves the fxjse/ directory to fxjs/ in anticipation of merging in
fpdfsdk/jsapi. In the process the filenames are updated to better match the
class contents. Static methods are moved to anonymous namespaces as possible.
Review-Url: https://codereview.chromium.org/2136213002
|