DescriptionWorkaround dubious casting between CXFA_Object and void* in FXJSE
This is just a crock to get things working until we fix the
underlying issue.
When there's single-inheritance, it may often work in practice
to C-style (reinterpret) cast a Derived* ptr to void* and then
back to a Base* ptr. One place where this blows up is if
Derived has virtual functions but Base does not, in which case
the world will be offset by the size of a vtable ptr.
Because of the use of void* types in FXJSE, the above was happening
when setting a CXFA_ThisProxy (Derived, virtual) to be a global
object (void*). This would then be cast back to a CFXA_Object
(Base, non-virtual) and chaos is ensured.
Not sure how far back this goes.
Along the way, pick up some tidying which was necessary for
simplicity while tracking this down.
BUG=613607
Committed: https://pdfium.googlesource.com/pdfium/+/3a005f22703b9303a306bf34cbd17c3729f763aa
Patch Set 1 : Shuffle code around, no functional changes #Patch Set 2 : drop file #Patch Set 3 : Add cheapo typechecking (not functional) #Patch Set 4 : Revert typecheck, actually fix code. #
Messages
Total messages: 13 (9 generated)
|