• Home
Name Date Size #Lines LOC

..--

gc/06-Sep-2024-923687

xfa/06-Sep-2024-19,28615,541

Android.bpD06-Sep-2024917 3731

BUILD.gnD06-Sep-20247.7 KiB302294

DEPSD06-Sep-2024151 1110

READMED06-Sep-20242 KiB4236

cfx_globaldata.cppD06-Sep-202411.6 KiB400326

cfx_globaldata.hD06-Sep-20242.1 KiB7552

cfx_globaldata_unittest.cppD06-Sep-20245.5 KiB168128

cfx_keyvalue.cppD06-Sep-2024409 165

cfx_keyvalue.hD06-Sep-2024843 4630

cfx_v8.cppD06-Sep-20244 KiB13394

cfx_v8.hD06-Sep-20242.4 KiB7552

cfx_v8_array_buffer_allocator.cppD06-Sep-20241.6 KiB5437

cfx_v8_array_buffer_allocator.hD06-Sep-20241.1 KiB3621

cfx_v8_unittest.cppD06-Sep-202410.3 KiB273227

cfxjs_engine.cppD06-Sep-202425 KiB690565

cfxjs_engine.hD06-Sep-20245.5 KiB155107

cfxjs_engine_embeddertest.cppD06-Sep-20243.8 KiB11692

cfxjs_engine_unittest.cppD06-Sep-20243.1 KiB11082

cjs_annot.cppD06-Sep-20243.4 KiB11279

cjs_annot.hD06-Sep-20241.3 KiB4628

cjs_app.cppD06-Sep-202419.7 KiB583453

cjs_app.hD06-Sep-20246.6 KiB164131

cjs_border.cppD06-Sep-2024773 2413

cjs_border.hD06-Sep-2024558 2412

cjs_color.cppD06-Sep-202410.9 KiB319253

cjs_color.hD06-Sep-20243.8 KiB11181

cjs_console.cppD06-Sep-20241.9 KiB6039

cjs_console.hD06-Sep-20241.3 KiB4429

cjs_delaydata.cppD06-Sep-2024439 134

cjs_delaydata.hD06-Sep-2024860 3523

cjs_display.cppD06-Sep-2024725 2312

cjs_display.hD06-Sep-2024563 2412

cjs_document.cppD06-Sep-202447.7 KiB1,4281,135

cjs_document.hD06-Sep-202414.1 KiB318264

cjs_event.cppD06-Sep-202410.6 KiB301233

cjs_event.hD06-Sep-20244.1 KiB10976

cjs_event_context.cppD06-Sep-202412.1 KiB427370

cjs_event_context.hD06-Sep-20245.7 KiB176157

cjs_event_context_stub.cppD06-Sep-2024559 177

cjs_event_context_stub.hD06-Sep-20243 KiB8067

cjs_field.cppD06-Sep-202490.1 KiB2,6402,217

cjs_field.hD06-Sep-202416 KiB375301

cjs_font.cppD06-Sep-20241.3 KiB3221

cjs_font.hD06-Sep-2024548 2412

cjs_global.cppD06-Sep-202417.9 KiB525460

cjs_global.hD06-Sep-20243.8 KiB10069

cjs_globalarrays.cppD06-Sep-20244 KiB8758

cjs_globalarrays.hD06-Sep-2024475 188

cjs_globalconsts.cppD06-Sep-20241.9 KiB4932

cjs_globalconsts.hD06-Sep-2024475 188

cjs_highlight.cppD06-Sep-2024738 2312

cjs_highlight.hD06-Sep-2024573 2412

cjs_icon.cppD06-Sep-20241.2 KiB3922

cjs_icon.hD06-Sep-20241,018 3822

cjs_object.cppD06-Sep-20241.5 KiB4529

cjs_object.hD06-Sep-20241.6 KiB6244

cjs_position.cppD06-Sep-2024874 2615

cjs_position.hD06-Sep-2024568 2412

cjs_publicmethods.cppD06-Sep-202445.3 KiB1,4581,224

cjs_publicmethods.hD06-Sep-20246.2 KiB155136

cjs_publicmethods_embeddertest.cppD06-Sep-20248.8 KiB264193

cjs_publicmethods_unittest.cppD06-Sep-20241.3 KiB5335

cjs_result.cppD06-Sep-2024591 207

cjs_result.hD06-Sep-20241.8 KiB5832

cjs_runtime.cppD06-Sep-20247.1 KiB235181

cjs_runtime.hD06-Sep-20242.3 KiB7146

cjs_runtimestub.cppD06-Sep-2024996 3621

cjs_runtimestub.hD06-Sep-20241.1 KiB3923

cjs_scalehow.cppD06-Sep-2024652 2110

cjs_scalehow.hD06-Sep-2024568 2412

cjs_scalewhen.cppD06-Sep-2024734 2312

cjs_scalewhen.hD06-Sep-2024573 2412

cjs_style.cppD06-Sep-2024808 2413

cjs_style.hD06-Sep-2024553 2412

cjs_timerobj.cppD06-Sep-2024897 3317

cjs_timerobj.hD06-Sep-2024816 3217

cjs_util.cppD06-Sep-202414.2 KiB480398

cjs_util.hD06-Sep-20242.2 KiB6943

cjs_util_unittest.cppD06-Sep-20243.9 KiB11560

cjs_zoomtype.cppD06-Sep-2024915 2615

cjs_zoomtype.hD06-Sep-2024568 2412

fx_date_helpers.cppD06-Sep-202414.3 KiB553473

fx_date_helpers.hD06-Sep-20242 KiB6951

fx_date_helpers_unittest.cppD06-Sep-20245.8 KiB156134

fxv8.cppD06-Sep-202410.9 KiB338271

fxv8.hD06-Sep-20245.2 KiB11184

global_timer.cppD06-Sep-20242.5 KiB9467

global_timer.hD06-Sep-20241.3 KiB5236

ijs_event_context.hD06-Sep-20243.5 KiB8869

ijs_runtime.cppD06-Sep-20241.7 KiB6245

ijs_runtime.hD06-Sep-20241.8 KiB6743

js_define.cppD06-Sep-20243 KiB10075

js_define.hD06-Sep-20245.8 KiB163116

js_resources.cppD06-Sep-20243.5 KiB109100

js_resources.hD06-Sep-20241.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