Hi Gabriel,
On 11/18/21 7:43 PM, Gabriel Ivăncescu wrote:
hres = prop_get(This, prop, &r);
hres = E_FAIL;
if(id == DISPID_VALUE)
hres = to_primitive(This->ctx, jsval_obj(This), &r, NO_HINT);
if(FAILED(hres))
hres = prop_get(This, prop, &r);
You can't try to call to_primitive and ignore its failure. The call may have visible effects. The failure, for example, may be from a throw inside toString JavaScript code.
Why do you need that in the first place? The attached patch (on top of your patch) passes all tests. Unless there are some obscure special cases, it looks like we should be able to get rid of builtin DISPID_VALUE getters.
Thanks,
Jacek