On Fri Apr 12 12:34:40 2024 +0000, Jacek Caban wrote:
Ah, and `PropFixOverride` looks redundant too, it should be possible to avoid that by changing prototype handling on jscript side.
The `GetProxyFieldRef` was the easiest I could find to handle all the cyclic ref special cases, plus it's also actually useful from mshtml itself even without jscript (for mshtml hooking to obtain the dispex for the hook…), but yeah let's leave that aside for now, will probably need to see the code. :-D
`PropInvoke` basically mostly forwards the arguments on mshtml side, I thought that's the easiest? Note that I **already** store the functions or accessors as *actual jscript functions*. The PROPERTYGET and PROPERTYPUT are used only on actual props on mshtml side (including special ones like on localStorage).
And yes, it is also used for calling the DISPID_VALUE (both in `invoke_prop_func` and `jsdisp_call_value`). I thought having one method that mostly forwards args in mshtml is the most elegant, especially because we already use those interfaces on mshtml for IE8 and below modes…
`PropDefineOverride` is similar to `PropOverride` except it's for defining instead of getter. Maybe I can use the same method for both, I don't know. There's probably room for improvement for sure, but my point was that I do believe we still need a way to hook into the getter/define ops on jscript side at the very least, which this MR is doing.