Age | Commit message (Collapse) | Author |
|
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 .
|
|
As seen when running FXJSV8Embeddertest.Getters.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1380993003 .
|
|
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 .
|
|
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 .
|
|
BUG=537173
R=jun_fang@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1376093002 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1372103004 .
|
|
This reverts commit 3e144b8c23d7c52ed36329e87f0cb01f38ec1ed7.
This may be causing the failures seen in crbug.com/537799.
BUG=537799
Review URL: https://codereview.chromium.org/1382433003 .
|
|
BUG=chromium:529012
R=jochen@chromium.org, krasin@google.com
Review URL: https://codereview.chromium.org/1353193004 .
|
|
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>.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1373333002 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
This was guarded by an assert, but the path is hit.
BUG=528015
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1345923002 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1345883003 .
|
|
MSVS can't figure out the value of strlen(kConstString) at compile time.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1342263002 .
|
|
The API is the same as the Foxit version, except the encoding is
specified as UTF-8 instead of local encoding.
Also remove CPDF_LWinParam since it's unused.
BUG=chromium:517713
R=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1335373002 .
|
|
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 .
|
|
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 .
|
|
BUG=chromium:528376
R=ulan@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1337433002 .
|
|
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 .
|
|
Use two seperate loops to kill current focus annot and to release annots
in current page. Loop to kill current focus annot is run first, so it
will not access deleted annots.
BUG=507316
R=tsepez@chromium.org
TEST=Reproduction steps mentioned in issue 507316 should not crash
chrome.
Unit test added to pdfium.
Run pdfium_embeddertests.exe.
Review URL: https://codereview.chromium.org/1312313006 .
|
|
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 .
|
|
It's pointless to have an abstract interface and its only concrete
implementation defined in the same header. We can de-virtualize along
the way and get a small savings.
Rename CPDFSDK_BFAnnotHandler along the way, since its the only kind
of AnnotHandler, and I can't imagine what BF stands for.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1313733013 .
|
|
It's never instantiated, and any pointers to it are always NULL.
Also kill an unused arg to CPDFSDK_ActionHandler ctor along the way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1329583004 .
|
|
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 .
|
|
Fixes the remaining issues, except for JBIG2/Skia ...
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1298393003 .
|
|
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 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1288053005 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1284193005 .
|