• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

xfa/23-Nov-2023-19,54115,832

Android.bpD23-Nov-2023944 4033

BUILD.gnD23-Nov-20236.6 KiB253245

DEPSD23-Nov-2023151 1110

READMED23-Nov-20232 KiB4236

cfx_globaldata.cppD23-Nov-202311.6 KiB400325

cfx_globaldata.hD23-Nov-20232.4 KiB8559

cfx_globaldata_unittest.cppD23-Nov-20235.5 KiB164126

cfx_keyvalue.cppD23-Nov-2023427 165

cfx_keyvalue.hD23-Nov-2023846 4630

cfx_v8.cppD23-Nov-20236.9 KiB218173

cfx_v8.hD23-Nov-20232.7 KiB8057

cfx_v8_unittest.cppD23-Nov-202310.4 KiB270224

cfx_v8_unittest.hD23-Nov-2023924 4025

cfxjs_engine.cppD23-Nov-202324.1 KiB668550

cfxjs_engine.hD23-Nov-20235 KiB14493

cfxjs_engine_embeddertest.cppD23-Nov-20233.5 KiB10783

cfxjs_engine_unittest.cppD23-Nov-20232.8 KiB10175

cjs_annot.cppD23-Nov-20233.6 KiB11582

cjs_annot.hD23-Nov-20231.3 KiB4728

cjs_app.cppD23-Nov-202319.3 KiB572444

cjs_app.hD23-Nov-20236.7 KiB164131

cjs_border.cppD23-Nov-2023787 2413

cjs_border.hD23-Nov-2023571 2412

cjs_color.cppD23-Nov-202310.8 KiB320254

cjs_color.hD23-Nov-20233.8 KiB11080

cjs_console.cppD23-Nov-20231.9 KiB6140

cjs_console.hD23-Nov-20231.3 KiB4429

cjs_delaydata.cppD23-Nov-2023449 134

cjs_delaydata.hD23-Nov-2023866 3523

cjs_display.cppD23-Nov-2023739 2312

cjs_display.hD23-Nov-2023576 2412

cjs_document.cppD23-Nov-202348.2 KiB1,4221,141

cjs_document.hD23-Nov-202314.3 KiB322268

cjs_event.cppD23-Nov-202311.2 KiB324255

cjs_event.hD23-Nov-20234.1 KiB10976

cjs_event_context.cppD23-Nov-202311.6 KiB327263

cjs_event_context.hD23-Nov-20235.7 KiB137121

cjs_event_context_stub.cppD23-Nov-2023456 135

cjs_event_context_stub.hD23-Nov-20235.2 KiB117104

cjs_eventrecorder.cppD23-Nov-202315.4 KiB559479

cjs_eventrecorder.hD23-Nov-20237 KiB202178

cjs_field.cppD23-Nov-202391.1 KiB2,6642,234

cjs_field.hD23-Nov-202316 KiB376301

cjs_font.cppD23-Nov-20231.3 KiB3221

cjs_font.hD23-Nov-2023561 2412

cjs_global.cppD23-Nov-202320 KiB579505

cjs_global.hD23-Nov-20233.1 KiB8967

cjs_globalarrays.cppD23-Nov-20233.5 KiB7649

cjs_globalarrays.hD23-Nov-2023493 188

cjs_globalconsts.cppD23-Nov-20232.2 KiB5034

cjs_globalconsts.hD23-Nov-2023493 188

cjs_highlight.cppD23-Nov-2023752 2312

cjs_highlight.hD23-Nov-2023586 2412

cjs_icon.cppD23-Nov-20231.2 KiB3922

cjs_icon.hD23-Nov-20231 KiB3822

cjs_object.cppD23-Nov-20231.5 KiB4630

cjs_object.hD23-Nov-20231.7 KiB6244

cjs_position.cppD23-Nov-2023888 2615

cjs_position.hD23-Nov-2023581 2412

cjs_publicmethods.cppD23-Nov-202345.2 KiB1,4541,220

cjs_publicmethods.hD23-Nov-20236.1 KiB152133

cjs_publicmethods_embeddertest.cppD23-Nov-20238.6 KiB260190

cjs_publicmethods_unittest.cppD23-Nov-20231.3 KiB5134

cjs_result.cppD23-Nov-2023601 207

cjs_result.hD23-Nov-20231.8 KiB5832

cjs_runtime.cppD23-Nov-20237.2 KiB238186

cjs_runtime.hD23-Nov-20232.4 KiB7348

cjs_runtimestub.cppD23-Nov-20231 KiB3722

cjs_runtimestub.hD23-Nov-20231.1 KiB3923

cjs_scalehow.cppD23-Nov-2023666 2110

cjs_scalehow.hD23-Nov-2023581 2412

cjs_scalewhen.cppD23-Nov-2023748 2312

cjs_scalewhen.hD23-Nov-2023586 2412

cjs_style.cppD23-Nov-2023822 2413

cjs_style.hD23-Nov-2023566 2412

cjs_timerobj.cppD23-Nov-2023906 3317

cjs_timerobj.hD23-Nov-2023824 3217

cjs_util.cppD23-Nov-202314 KiB475395

cjs_util.hD23-Nov-20232.1 KiB6639

cjs_util_unittest.cppD23-Nov-20232.8 KiB11359

cjs_zoomtype.cppD23-Nov-2023929 2615

cjs_zoomtype.hD23-Nov-2023581 2412

fx_date_helpers.cppD23-Nov-202314.3 KiB552471

fx_date_helpers.hD23-Nov-20232 KiB6951

fx_date_helpers_unittest.cppD23-Nov-20233.8 KiB10992

global_timer.cppD23-Nov-20232.3 KiB8962

global_timer.hD23-Nov-20231.3 KiB5135

ijs_event_context.hD23-Nov-20236 KiB133111

ijs_runtime.cppD23-Nov-20231.4 KiB5235

ijs_runtime.hD23-Nov-20231.8 KiB6643

js_define.cppD23-Nov-20233.3 KiB10282

js_define.hD23-Nov-20235.6 KiB161114

js_resources.cppD23-Nov-20233.5 KiB109100

js_resources.hD23-Nov-20231.1 KiB4635

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_FXJSEHostObjectTag for FXJSE Host objects, or
24  g_FXJSEProxyObjectTag for a global proxy object under FXJSE, or
25  One of 4 specific FXJSE_CLASS_DESCRIPTOR globals for FXJSE classes:
26    GlobalClassDescriptor
27    NormalClassDescriptor
28    VariablesClassDescriptor
29    formcalc_fm2js_descriptor
30
31Slot 1's contents are determined by these tags:
32  kPerObjectDataTag means an aligned pointer to CFXJS_PerObjectData.
33  g_FXJSEHostObjectTag means an aligned pointer to CFXJSE_HostObject.
34  g_FXJSEProxyObjectTag means nullptr, and to check the prototype instead.
35  A FXJSE_CLASS_DESCRIPTOR pointer means to expect an actual v8 function
36  object (or a string naming that function),  and not an aligned pointer.
37
38Because PDFium uses V8 for various unrelated purposes, there may be up to
39four v8::Contexts (JS Global Objects) associated with each document. One is
40used by FXJS and holds objects as described by the js_api_reference.pdf
41specification. The others are used by FXJSE.
42