Name Date Size #Lines LOC

..--

gc/H25-Apr-2025-923687

xfa/H25-Apr-2025-19,28615,541

Android.bpH A D25-Apr-2025917 3731

BUILD.gnH A D25-Apr-20257.7 KiB302294

DEPSH A D25-Apr-2025151 1110

READMEH A D25-Apr-20252 KiB4236

cfx_globaldata.cppH A D25-Apr-202511.6 KiB400326

cfx_globaldata.hH A D25-Apr-20252.1 KiB7552

cfx_globaldata_unittest.cppH A D25-Apr-20255.5 KiB168128

cfx_keyvalue.cppH A D25-Apr-2025409 165

cfx_keyvalue.hH A D25-Apr-2025843 4630

cfx_v8.cppH A D25-Apr-20254 KiB13394

cfx_v8.hH A D25-Apr-20252.4 KiB7552

cfx_v8_array_buffer_allocator.cppH A D25-Apr-20251.6 KiB5437

cfx_v8_array_buffer_allocator.hH A D25-Apr-20251.1 KiB3621

cfx_v8_unittest.cppH A D25-Apr-202510.3 KiB273227

cfxjs_engine.cppH A D25-Apr-202525 KiB690565

cfxjs_engine.hH A D25-Apr-20255.5 KiB155107

cfxjs_engine_embeddertest.cppH A D25-Apr-20253.8 KiB11692

cfxjs_engine_unittest.cppH A D25-Apr-20253.1 KiB11082

cjs_annot.cppH A D25-Apr-20253.4 KiB11279

cjs_annot.hH A D25-Apr-20251.3 KiB4628

cjs_app.cppH A D25-Apr-202519.7 KiB583453

cjs_app.hH A D25-Apr-20256.6 KiB164131

cjs_border.cppH A D25-Apr-2025773 2413

cjs_border.hH A D25-Apr-2025558 2412

cjs_color.cppH A D25-Apr-202510.9 KiB319253

cjs_color.hH A D25-Apr-20253.8 KiB11181

cjs_console.cppH A D25-Apr-20251.9 KiB6039

cjs_console.hH A D25-Apr-20251.3 KiB4429

cjs_delaydata.cppH A D25-Apr-2025439 134

cjs_delaydata.hH A D25-Apr-2025860 3523

cjs_display.cppH A D25-Apr-2025725 2312

cjs_display.hH A D25-Apr-2025563 2412

cjs_document.cppH A D25-Apr-202547.7 KiB1,4281,135

cjs_document.hH A D25-Apr-202514.1 KiB318264

cjs_event.cppH A D25-Apr-202510.6 KiB301233

cjs_event.hH A D25-Apr-20254.1 KiB10976

cjs_event_context.cppH A D25-Apr-202512.1 KiB427370

cjs_event_context.hH A D25-Apr-20255.7 KiB176157

cjs_event_context_stub.cppH A D25-Apr-2025559 177

cjs_event_context_stub.hH A D25-Apr-20253 KiB8067

cjs_field.cppH A D25-Apr-202590.1 KiB2,6402,217

cjs_field.hH A D25-Apr-202516 KiB375301

cjs_font.cppH A D25-Apr-20251.3 KiB3221

cjs_font.hH A D25-Apr-2025548 2412

cjs_global.cppH A D25-Apr-202517.9 KiB525460

cjs_global.hH A D25-Apr-20253.8 KiB10069

cjs_globalarrays.cppH A D25-Apr-20254 KiB8758

cjs_globalarrays.hH A D25-Apr-2025475 188

cjs_globalconsts.cppH A D25-Apr-20251.9 KiB4932

cjs_globalconsts.hH A D25-Apr-2025475 188

cjs_highlight.cppH A D25-Apr-2025738 2312

cjs_highlight.hH A D25-Apr-2025573 2412

cjs_icon.cppH A D25-Apr-20251.2 KiB3922

cjs_icon.hH A D25-Apr-20251,018 3822

cjs_object.cppH A D25-Apr-20251.5 KiB4529

cjs_object.hH A D25-Apr-20251.6 KiB6244

cjs_position.cppH A D25-Apr-2025874 2615

cjs_position.hH A D25-Apr-2025568 2412

cjs_publicmethods.cppH A D25-Apr-202545.3 KiB1,4581,224

cjs_publicmethods.hH A D25-Apr-20256.2 KiB155136

cjs_publicmethods_embeddertest.cppH A D25-Apr-20258.8 KiB264193

cjs_publicmethods_unittest.cppH A D25-Apr-20251.3 KiB5335

cjs_result.cppH A D25-Apr-2025591 207

cjs_result.hH A D25-Apr-20251.8 KiB5832

cjs_runtime.cppH A D25-Apr-20257.1 KiB235181

cjs_runtime.hH A D25-Apr-20252.3 KiB7146

cjs_runtimestub.cppH A D25-Apr-2025996 3621

cjs_runtimestub.hH A D25-Apr-20251.1 KiB3923

cjs_scalehow.cppH A D25-Apr-2025652 2110

cjs_scalehow.hH A D25-Apr-2025568 2412

cjs_scalewhen.cppH A D25-Apr-2025734 2312

cjs_scalewhen.hH A D25-Apr-2025573 2412

cjs_style.cppH A D25-Apr-2025808 2413

cjs_style.hH A D25-Apr-2025553 2412

cjs_timerobj.cppH A D25-Apr-2025897 3317

cjs_timerobj.hH A D25-Apr-2025816 3217

cjs_util.cppH A D25-Apr-202514.2 KiB480398

cjs_util.hH A D25-Apr-20252.2 KiB6943

cjs_util_unittest.cppH A D25-Apr-20253.9 KiB11560

cjs_zoomtype.cppH A D25-Apr-2025915 2615

cjs_zoomtype.hH A D25-Apr-2025568 2412

fx_date_helpers.cppH A D25-Apr-202514.3 KiB553473

fx_date_helpers.hH A D25-Apr-20252 KiB6951

fx_date_helpers_unittest.cppH A D25-Apr-20255.8 KiB156134

fxv8.cppH A D25-Apr-202510.9 KiB338271

fxv8.hH A D25-Apr-20255.2 KiB11184

global_timer.cppH A D25-Apr-20252.5 KiB9467

global_timer.hH A D25-Apr-20251.3 KiB5236

ijs_event_context.hH A D25-Apr-20253.5 KiB8869

ijs_runtime.cppH A D25-Apr-20251.7 KiB6245

ijs_runtime.hH A D25-Apr-20251.8 KiB6743

js_define.cppH A D25-Apr-20253 KiB10075

js_define.hH A D25-Apr-20255.8 KiB163116

js_resources.cppH A D25-Apr-20253.5 KiB109100

js_resources.hH A D25-Apr-20251.1 KiB4736

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  kFXJSEHostObjectTag for FXJSE Host objects, or
24  kFXJSEProxyObjectTag for a global proxy object under FXJSE, or
25  One of 4 specific FXJSE_CLASS_DESCRIPTOR globals for FXJSE classes:
26    kGlobalClassDescriptor
27    kNormalClassDescriptor
28    kVariablesClassDescriptor
29    kFormCalcDescriptor
30
31Slot 1's contents are determined by these tags:
32  kPerObjectDataTag means an aligned pointer to CFXJS_PerObjectData.
33  kFXJSEHostObjectTag means an aligned pointer to CFXJSE_HostObject.
34  kFXJSEProxyObjectTag 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