From 4862705090a7469115ae7e3c80143b6f8b6b527a Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 5 Apr 2018 22:41:53 +0000 Subject: Make Internal field usage in cfxjs_engine match README.doc As it turns out, this doesn't cause any bugs with the FXJS/FXJSE interaction since the magic values will never be present in the other slot, but the code looks wrong wrt. the document. Also fix an assert in FXJSE that our objects have two slots, and null appropriately (just a defensive measure). Also assert that one of our casts is valid. Change-Id: I3146fe58350da5e9b76e711d81480565dabd587f Reviewed-on: https://pdfium-review.googlesource.com/29859 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fxjs/README | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fxjs/README') diff --git a/fxjs/README b/fxjs/README index adc5827dbe..a38e746d4e 100644 --- a/fxjs/README +++ b/fxjs/README @@ -28,6 +28,8 @@ tag and contains either: formcalc_fm2js_descriptor Slot 1's contents are determined by these tags: - kPerObjectDataTag means to expect a CFXJS_PerObjectData. - g_FXJSETagString means to expect a CFXJSE_HostObject. - A FXJSE_CLASS_DESCRIPTOR pointer means to expect a v8 function. + kPerObjectDataTag means an aligned pointer to CFXJS_PerObjectData. + g_FXJSETagString means an aligned pointer to CFXJSE_HostObject. + A FXJSE_CLASS_DESCRIPTOR pointer means to expect an actual v8 function + object, and not an aligned pointer. + -- cgit v1.2.3