[PATCH v7 08/11] jscript: Get rid of the value_prop from jsdisp props.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Thu Nov 25 07:53:12 CST 2021
On 24/11/2021 20:07, Jacek Caban wrote:
> On 11/24/21 6:53 PM, Gabriel Ivăncescu wrote:
>> On 24/11/2021 19:36, Jacek Caban wrote:
>>> Hi Gabriel,
>>>
>>> On 11/24/21 3:10 PM, Gabriel Ivăncescu wrote:
>>>> @@ -2088,7 +2081,10 @@ HRESULT disp_call(script_ctx_t *ctx,
>>>> IDispatch *disp, DISPID id, WORD flags, uns
>>>> if(ctx != jsdisp->ctx)
>>>> flags &= ~DISPATCH_JSCRIPT_INTERNAL_MASK;
>>>> - hres = jsdisp_call(jsdisp, id, flags, argc, argv, ret);
>>>> + if(id == DISPID_VALUE)
>>>> + hres = jsdisp_call_value(jsdisp, to_disp(jsdisp),
>>>> flags, argc, argv, ret);
>>>> + else
>>>> + hres = jsdisp_call(jsdisp, id, flags, argc, argv, ret);
>>>
>>>
>>> Why do we need it here? Do we ever call disp_call(DISPID_VALUE)?
>>>
>>
>> Yes, apparently it is needed and can happen, otherwise some of the
>> mshtml tests will fail. I added an assertion when testing it and it
>> triggered. This happens from engine.c's exprval_call of course.
>
>
> That seems weird, is it with jdsidp_t? Since we should never return
> DISPID_VALUE as a property ID, I would not expect us to call it like
> that. It's probably worth a closer look.
>
It seems it's with normal disps, not jsdisp. Looks like it happens in
mshtml `scripts` test in dom.js in the "stylesheets" test. We have this
line:
var stylesheet = document.styleSheets.item(0);
But DISPID_IHTMLSTYLESHEETSCOLLECTION_ITEM is same as DISPID_VALUE, so
of course it gets triggered.
I'm guessing that this is not possible for jsdisp, since all the (named)
props now have a positive DISPID, so I'll remove it.
More information about the wine-devel
mailing list