• Home
Name Date Size #Lines LOC

..--

xfa/03-May-2024-15,97311,145

CJX_Define.hD03-May-20241.4 KiB3825

DEPSD03-May-2024165 1211

JS_Define.cppD03-May-20248.4 KiB309255

JS_Define.hD03-May-20246.1 KiB167126

READMED03-May-20241.5 KiB3429

cfxjse_arguments.cppD03-May-20241.9 KiB6042

cfxjse_arguments.hD03-May-20241.1 KiB3825

cfxjse_class.cppD03-May-202411.7 KiB302262

cfxjse_class.hD03-May-20241.3 KiB4429

cfxjse_context.cppD03-May-202410.1 KiB275237

cfxjse_context.hD03-May-20241.8 KiB5940

cfxjse_engine.cppD03-May-202426.7 KiB756651

cfxjse_engine.hD03-May-20245.1 KiB12299

cfxjse_formcalc_context.cppD03-May-2024203.3 KiB6,2555,447

cfxjse_formcalc_context.hD03-May-202421.4 KiB446422

cfxjse_formcalc_context_embeddertest.cppD03-May-202443.4 KiB1,4471,099

cfxjse_isolatetracker.hD03-May-20241.7 KiB5639

cfxjse_resolveprocessor.cppD03-May-202425.2 KiB747673

cfxjse_resolveprocessor.hD03-May-20242.5 KiB7859

cfxjse_runtimedata.cppD03-May-20241.7 KiB5134

cfxjse_runtimedata.hD03-May-2024965 3720

cfxjse_value.cppD03-May-202414.5 KiB429351

cfxjse_value.hD03-May-20243 KiB9979

cjs_annot.cppD03-May-20243.3 KiB11280

cjs_annot.hD03-May-20241.4 KiB5132

cjs_app.cppD03-May-202418.8 KiB578449

cjs_app.hD03-May-20246.6 KiB170134

cjs_border.cppD03-May-2024813 2413

cjs_border.hD03-May-2024645 2513

cjs_color.cppD03-May-202410.1 KiB303242

cjs_color.hD03-May-20243.8 KiB11684

cjs_console.cppD03-May-20241.8 KiB5435

cjs_console.hD03-May-20241.4 KiB4832

cjs_delaydata.cppD03-May-2024449 134

cjs_delaydata.hD03-May-2024880 3624

cjs_display.cppD03-May-2024765 2312

cjs_display.hD03-May-2024651 2513

cjs_document.cppD03-May-202450.3 KiB1,5001,213

cjs_document.hD03-May-202414.2 KiB331273

cjs_embedobj.cppD03-May-2024416 144

cjs_embedobj.hD03-May-2024620 2613

cjs_event.cppD03-May-20249.8 KiB308235

cjs_event.hD03-May-20244.1 KiB11278

cjs_event_context.cppD03-May-202410 KiB282227

cjs_event_context.hD03-May-20245.7 KiB137120

cjs_event_context_stub.cppD03-May-2024422 135

cjs_event_context_stub.hD03-May-20245.2 KiB119106

cjs_eventhandler.cppD03-May-202418 KiB655556

cjs_eventhandler.hD03-May-20246.4 KiB198172

cjs_field.cppD03-May-202486.1 KiB2,6742,237

cjs_field.hD03-May-202418.6 KiB439358

cjs_font.cppD03-May-20241.3 KiB3221

cjs_font.hD03-May-2024633 2513

cjs_global.cppD03-May-202421.6 KiB616540

cjs_global.hD03-May-20241.4 KiB4327

cjs_globalarrays.cppD03-May-20243.4 KiB7548

cjs_globalarrays.hD03-May-2024486 188

cjs_globalconsts.cppD03-May-20242 KiB4832

cjs_globalconsts.hD03-May-2024486 188

cjs_globaldata.cppD03-May-202412.4 KiB397326

cjs_globaldata.hD03-May-20242.5 KiB7856

cjs_globalvariablearray.cppD03-May-20242.3 KiB6955

cjs_globalvariablearray.hD03-May-2024735 3017

cjs_highlight.cppD03-May-2024778 2312

cjs_highlight.hD03-May-2024663 2513

cjs_icon.cppD03-May-20241.1 KiB3922

cjs_icon.hD03-May-20241.1 KiB4326

cjs_keyvalue.cppD03-May-2024340 123

cjs_keyvalue.hD03-May-2024693 2917

cjs_object.cppD03-May-20241.7 KiB5135

cjs_object.hD03-May-20241.9 KiB7250

cjs_position.cppD03-May-2024914 2615

cjs_position.hD03-May-2024657 2513

cjs_printparamsobj.cppD03-May-2024927 3522

cjs_printparamsobj.hD03-May-2024972 4228

cjs_publicmethods.cppD03-May-202451.3 KiB1,7411,478

cjs_publicmethods.hD03-May-20246.5 KiB161142

cjs_publicmethods_embeddertest.cppD03-May-20245.4 KiB163117

cjs_publicmethods_unittest.cppD03-May-20241.4 KiB5235

cjs_report.cppD03-May-20241.2 KiB4324

cjs_report.hD03-May-20241.1 KiB4226

cjs_return.cppD03-May-2024595 197

cjs_return.hD03-May-2024876 3521

cjs_runtime.cppD03-May-20248.6 KiB293230

cjs_runtime.hD03-May-20242.3 KiB7448

cjs_runtimestub.cppD03-May-20241.6 KiB6139

cjs_scalehow.cppD03-May-2024692 2110

cjs_scalehow.hD03-May-2024657 2513

cjs_scalewhen.cppD03-May-2024774 2312

cjs_scalewhen.hD03-May-2024663 2513

cjs_style.cppD03-May-2024848 2413

cjs_style.hD03-May-2024639 2513

cjs_timerobj.cppD03-May-2024885 3317

cjs_timerobj.hD03-May-2024955 3923

cjs_util.cppD03-May-202414 KiB472396

cjs_util.hD03-May-20241.8 KiB6443

cjs_util_unittest.cppD03-May-20242.9 KiB11460

cjs_v8.cppD03-May-20247.5 KiB242195

cjs_v8.hD03-May-20243.2 KiB9468

cjs_zoomtype.cppD03-May-2024955 2615

cjs_zoomtype.hD03-May-2024657 2513

fxjs_v8.cppD03-May-202419.6 KiB555454

fxjs_v8.hD03-May-20246.4 KiB196131

fxjs_v8_embeddertest.cppD03-May-20248 KiB229187

fxjse.hD03-May-20242.1 KiB7149

global_timer.cppD03-May-20242.2 KiB8157

global_timer.hD03-May-20241.4 KiB5134

ijs_event_context.hD03-May-20246 KiB134111

ijs_runtime.hD03-May-20241.4 KiB4529

js_resources.cppD03-May-20242.6 KiB7162

js_resources.hD03-May-20241 KiB4231

README

1There are two separate wrappers for V8 here.  One is called FXJS, and
2it is used by the non-XFA code.  The other is called FXJSE, and it is
3used only by the XFA code.  Additionally FXJSE may request services
4from FXJS to bridge the two.
5
6Both the FXJS and FXJSE binding code needs to be replaced by something
7saner, perhaps Gin or perhaps some IDL. See
8  https://bugs.chromium.org/p/pdfium/issues/detail?id=716
9for progress on the issue.
10
11FXJS binds objects by sticking a pointer to a CFXJS_PerObjectData in
12the V8 object's internal slot.  FXJSE binds objects by sticking a
13pointer to either an actual v8 function object or a CFXJSE_HostObject
14in the V8 object's internal slot, depending upon whether the object
15represents (in some notion) a "class" or an "instance". Also, V8 objects
16bound in one library may unexpectedly arrive at the other given a script
17that's trying to mess with us.
18
19To distinguish these cases, we use two internal slots for all bound
20objects, regardless of the FXJS/FXJSE distinction.  Slot 0 is the
21tag and contains either:
22  kPerObjectDataTag for FXJS objects, or
23  g_FXJSETagString for FXJSE Host objects, or
24  One of 4 specific FXJSE_CLASS_DESCRIPTOR globals for FXJSE classes:
25    GlobalClassDescriptor
26    NormalClassDescriptor
27    VariablesClassDescriptor
28    formcalc_fm2js_descriptor
29
30Slot 1's contents are determined by these tags:
31  kPerObjectDataTag means to expect a CFXJS_PerObjectData.
32  g_FXJSETagString means to expect a CFXJSE_HostObject.
33  A FXJSE_CLASS_DESCRIPTOR pointer means to expect a v8 function.
34