Age | Commit message (Collapse) | Author |
|
BUG=515137,564736
R=ochang@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1533233002 .
|
|
Introduced at https://codereview.chromium.org/1424933013/
The v8 objects are 1:1 with the context being destroyed in
FXJS_ReleaseRuntime, but the CFXJS_ObjDefinitions are still
1:1 with the isolate, so they can't be destroyed until the
refcounts hit zero.
BUG=561184
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/1468423004 .
|
|
That refer to parent directories.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1434223002 .
|
|
Every time we initialize a new v8::Context, we make a new set of
pre-existing native objects, and overwrite the v8::Global
handles to those in the previous set. Thus, we may be
theoretically releasing some v8::Globals early.
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/1424933013 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1430213002 .
|
|
-Wunused-variable triggers for PODs, but not for CFX_WideString.
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/1412423013 .
|
|
Do some IWYU to fix build errors due to files that have no #includes but
just happened to work previously because the #includes were in the right
order.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1407423004 .
|
|
Use m_ naming convention for its members.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1424933012 .
|
|
Its pointless to have a function that gets the isolate
given a v8::object, since v8 gives us that directly.
Also remove some CreationContext() calls, since they are only
used to get the isolate, and we can do so directly.
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/1413733004 .
|
|
- In non-standalone builds, use the provided jpeg library.
- Run gn format over all the GN files.
- Also roll DEPS for buildtools to c2f2598.
BUG=541704
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1425153006 .
|
|
Should fix a bunch of JS related memory leaks reported by LSan/DrMemory.
R=jochen@chromium.org, thestig@chromium.org, tsepez@chromium.org
BUG=pdfium:242
Review URL: https://codereview.chromium.org/1417973009 .
|
|
This better separates the two IJS_ classes, with the IJS_Context
taking on its proper role of describing an event. There's no need
for the event details for object creation, so this gets much
cleaner.
Move some JS error reporting code from CJS_Context to CJS_Runtime.
Make InitInstance() and ExitInstance() voids, they always return
TRUE and we never check the result anyways.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1389163007 .
|
|
Nothing but sed.
FXJS is a layer that makes it easier to define objects in V8, but has
no knowledge of PDF-specific native objects. It could in theory be used
to implement other sets of native objects.
JS is the layer that implements PDF-specific native objects on top of
FXJS.
Therefore, the classes used to interface to JS should be named using
IJS_. IFXJS_ is reserved for someday adding better API for FXJS iteslf.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1386173002 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1389003003 .
|
|
Avoids doing a lookup via FXJS_V8 for something already
known in CJS layer.
Also:
Consolidate repeated code in JS macros.
Remove knowledge that Document is global from FXJS layer
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1382263002 .
|
|
Start to back-fill some tests for the recent isolate work.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1377293004 .
|
|
The fpdfsdk/include/javascript/IJavascript.h is the sole API.
This required moving a creaton method to it from JS_Runtime.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1389783002 .
|
|
As seen when running FXJSV8Embeddertest.Getters.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1380993003 .
|
|
BUG=539106
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1386823002 .
|
|
BUG=531339
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1377463005 .
|
|
Move the external isolate and embedder slot from the
IPDF_JSPlatforms struct supplied at the
FPDFDOC_InitFormFillEnvironment() call time to arguments to
the FPDF_InitLibraryWithConfig() call.
This has several benefits:
-- Avoids the crash that could happen if multiple
FPDFDOC_InitFormFillEnvironmen() calls should happen to be
made by an embedder with different slot values.
-- Down the road, for XFA, there may be XFA but no FormFill
environment.
We support both forms for the time being, until the chrome
side catches up, at which point we will deprecate the old
way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1367033002 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1372103004 .
|
|
BUG=chromium:529012
R=jochen@chromium.org, krasin@google.com
Review URL: https://codereview.chromium.org/1353193004 .
|
|
Follow-up from https://codereview.chromium.org/1366053003/
- use kPerIsolateDataIndex rather than magic constant 1.
- make a helper function for common code in JS_Define.h
- remove dead prototypes missed in earlier CL.
- fxjs_v8 can't include generic fpdfsdk includes (layering).
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/1367813003 .
|
|
This reverts commit 3b4382a847b5a7439a3107512dbe54c317108579.
The difference between this CL and the one that failed is
fxjs_v8.cpp:271. In master, we pass the runtime information
as:
v8::isolate -> v8::Context -> FXJS Runtime,
but in XFA:
V8::Isolate -> PerIsolate struct -> FXJS Runtime.
The master way is more correct, in that FXJS_Runtime is 1:1
with v8 contexts and many:1 (in theory) with isolates.
It looks like the XFA branch missed a patch along the way.
I'll do that next.
Having made this change, the only data in the per-isolate
struct will be the ptr array (on master); it will also
include the XFA context (on XFA). I've kept the struct on
master for the sake of similarity.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1365733003 .
|
|
Reason for revert: embeddertests failed.
This reverts commit 70bc04b16646c92f221c5aa56831b01d6ec7c1ca.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1358263004 .
|
|
Work on this was first performed on the XFA branch, since
it has additional requirements (FXJSE layer) that needed
to be accomodated by the solution.
(cherry picked from commit ed7b2b50aa1744e0bc5a60bef12c61fa91d863b7)
Original Review URL: https://codereview.chromium.org/1351173002 .
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1354593004 .
|
|
Kill some now unused functions as a result.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1350703003 .
|
|
Re-arrange things in the header so function overloads are
next to each other, and related things are near each other.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1348693003 .
|
|
Move header file includes when usage moved.
Windows-only section missing a ")".
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1349783003 .
|
|
Currently, its hard to tell which functions come from the JS_
layer at fpdfsdk/include/javascript vs. which functions come
from the FXJS_V8 layer at fpdfsdk/include/jsapi. Until we
take up the task of using namespaces, at least make the
prefix consistent.
Move objects out of FXJS_V8 that are really part of JS_.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1347833002 .
|
|
Wrong parameter set to nullptr during one of the CL revisions.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1344483005 .
|
|
This forces the layer defined by fxjs_v8.h to be (more)
self-contained, so that it can be tested apart from the
CJS_* objects (in fpdfsdk/{src,include}/javascript. This
implies the array buffer allocator must be part of fxjs_v8.
One wrinkle is that we'd like to be able to test an isolate
upon which no native objects have been added, so some
initialization that would have occurred as part of object
definition must be made explicit.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1338073002 .
|
|
Replace multiple #defines of the same strings with externs.
Fix strings mangled by interaction of # and clang-format.
Remove macros as possible.
Make more JS_ functions void and simplify.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1342433002 .
|
|
It's too hard to keep mapping between v8 and fx abstractions; the lack
of transparency prevents those skilled in v8 only from working on this
code.
Apparently, the original intention was to confine v8 types to
fpdfsdk/{include,src}/jsapi, but fpdfsdk/{include,src}/javascript
is already well-polluted with v8 types.
Also remove no-op JS_SetThisObj().
Also remove unused ParserParams() [noticed because it was incorrectly
passing handles as pointers].
Also remove cast operator from CJS_Runtime and call GetIsolate()
explicitly.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1332973002 .
|
|
BUG=chromium:528376
R=ulan@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1337433002 .
|
|
This, in turn, allows us to get rid of the DoJob method and its clumsy
mode parameter conditional.
Add explicit and consts, and remove pointless asserts along the way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1318543012 .
|
|
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163' | \
xargs ../../buildtools/mac/clang-format -i
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1265503005 .
|
|
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255293002 .
|
|
Try to reland this patch after fixing underlying issues that
caused it to be reverted.
fx_system.h is the only manual edit.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1258093002 .
|
|
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9.
Reason for revert: build failure.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255693002 .
|
|
Fully automatic change, execpt for cleanup in fx_system.h
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1254703002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1249643003 .
|
|
Chrome already uses 0 and 1.
BUG=none
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1235303003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1173343004.
|
|
This involves fixing some multiple variable per line
declarations, as the textually-substituted "*" applies
only to the first one.
This involves moving some consts around following the
substitution.
This involves replacing some typedefs used as constructors
with better code.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1171733003
|
|
those types are just aliases, and we should consistently use the new version
R=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1138823004
|
|
In most cases, we just CHECK() that no exception was thrown. Previously,
we'd just crash.
Ideally, this should all be fixed and the system should cope with those
exceptions, but that's beyond this CL.
R=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1126203010
|
|
Phantom handles allow for freeing objects with one pass of GC. However,
this means that by the time the callback is invoked, the v8 object already
does no longer exist. To avoid accidential access to the dead object, there
are now two callbacks, where the first must only reset the handle, and the
second does the clean-up work.
R=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1129253004
|
|
The internal fields are scanned by the garbage collector, so they can't contain arbitrary data. However, aligned pointers are supported by the V8 GC, so the V8
API allows for setting a pointer directly instead of wrapping it in an External
container.
Not only is this faster, but it's also required for the new v8::Global API which
I'm going to update to in a follow-up patch.
R=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1139853003
|