Age | Commit message (Collapse) | Author |
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1401423004 .
|
|
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 .
|
|
Original patch from issue 1391843004 at patchset 1
(http://crrev.com/1391843004#ps1)
Introduce a pdf_enable_v8 GYP variable, which controls a
corresponding PDF_ENABLE_V8 #define, and bring in the real
JS library when set. Otherwise, link against a stub JS
runtime.
BUG=pdfium:211
R=dml@google.com, jochen@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1395733006 .
|
|
CJS_Values should belong to CJS_Runtimes so that we may
eventually cram much of the v8 dependencies down into fxjs.
This is a first step; the remaining split in this code between
isolate and CJS_Runtime goes away when fxjs provides a CFXJS_Runtime
object, and the CJS_Runtime is-a/has-a CFXJS_Runtime. But that can't
happen until this is resolved.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1394103002 .
|
|
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 .
|
|
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 .
|
|
It merely includes a bunch of other .h files which are handled
better since we fixed IWYU.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1385983002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1374723004 .
|
|
BUG=539106
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1386823002 .
|
|
Also remove dead CJS_EmbedObj::{Begin,End}Timer code.
BUG=539107
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1384883002 .
|
|
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 .
|
|
This reverts commit 3e144b8c23d7c52ed36329e87f0cb01f38ec1ed7.
This may be causing the failures seen in crbug.com/537799.
BUG=537799
Review URL: https://codereview.chromium.org/1382433003 .
|
|
Right now we're freeing per-isolate data everytime a document is destroyed even
though it may be in use by other documents. For now we leak the per-isolate
data until crbug.com/531339 is fixed.
BUG=531339
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/1372353002 .
Patch from Raymes Khoury <raymes@chromium.org>.
|
|
This avoids some custom linked-list code. Also note that
we use a local copy to be sure we removed the same thing
that was added no matter how our callees may muck with the
handler.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1352393003 .
|
|
The Factory Design Pattern isn't buying us anything here over just new'ing
the object we want.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1360523004 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1349423006 .
|
|
Kill some now unused functions as a result.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1350703003 .
|
|
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 .
|
|
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 .
|
|
First part of getting rid of CJS_RuntimeFactory. The factory design
pattern isn't appropriate here since we only ever make one kind of
object.
CJS_GlobalData is now perfectly capable of managing itself through
internal ref counts. I'm philosophically opposed to keeping ref-counts
outside the object (do you hear me std::shared_ptr, you're bad!)
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1338993005 .
|
|
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 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1335763002 .
|
|
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 .
|
|
At line 2026 in pdfsdk/src/javascript/PublicMethods.cpp,
the writer wants to perform type cast like line 2027 but
he made a mistake to make type conversion on m_pValue.
Even at line 2027, it's redundant to make type conversion.
The returned type of pContext->GetEventHandler() is
CJS_EventHandler*.
BUG=529310
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1325753007 .
|
|
Some of the values returned are dubious; capture the
current state of affairs.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1317393003 .
|
|
BUG=pdfium:181
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1331633002 .
|
|
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 .
|
|
- Handle NULL in buffer operator<< under JS mailForm() calls.
- Ensure correct type in JS addIcon() calls.
BUG=489995
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1327473002 .
|
|
Part 1. Move to headers so compiler can type check against
the definitions.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1299963002 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1297723002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1290383003 .
|
|
They look too much like locals; use JSGlobalData and JSGlobalAlternate
instead. Kill some commented out code.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1289903004 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1287193005 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1293673003 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1286383004 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1287863002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1279493003 .
|
|
Also add a presubmit that checks for this so I don't have to keep doing it.
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
BUG=none
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1272653005 .
|
|
BUG=chromium:515718
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1269783005 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1256283005 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1269223002 .
|
|
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 is the javascript test failure at 320b2313d198.
The spec says they are booleans, not ints, so correct the behaviour now.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1242263010 .
|
|
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 .
|