[PATCH 1/2] jscript: Handle detached scope objects 'this' in Object.toString.
Jacek Caban
jacek at codeweavers.com
Thu May 5 10:18:18 CDT 2022
Hi Gabriel,
On 5/4/22 18:10, Gabriel Ivăncescu wrote:
> diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c
> index a675e45..453ea95 100644
> --- a/dlls/jscript/object.c
> +++ b/dlls/jscript/object.c
> @@ -73,8 +73,9 @@ static HRESULT Object_toString(script_ctx_t *ctx, jsval_t vthis, WORD flags, uns
> str = L"[object Object]";
> }else if(names[jsdisp->builtin_info->class]) {
> str = names[jsdisp->builtin_info->class];
> + }else if(jsdisp->builtin_info->class == JSCLASS_NONE) {
> + hres = JS_E_OBJECT_EXPECTED;
> }else {
> - assert(jsdisp->builtin_info->class != JSCLASS_NONE);
> FIXME("jsdisp->builtin_info->class = %d\n", jsdisp->builtin_info->class);
> hres = E_FAIL;
> }
It seems like something is still not working as intended and I'm not
sure if it's the right place to fix it. Why would it be specific to
detached scopes? I was wondering why you need so complicated test and
tried the attached one. It works fine on Windows, but fails with your patch.
Thanks,
Jacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 776 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220505/934b7d78/attachment.bin>
More information about the wine-devel
mailing list