Jacek Caban (@jacek) commented about dlls/jscript/function.c:
return hres; }
-static HRESULT HostConstructor_toString(FunctionInstance *function, jsstr_t **ret) +static HRESULT HostConstructor_toString(FunctionInstance *func, jsstr_t **ret) { - *ret = jsstr_alloc(L"\nfunction() {\n [native code]\n}\n"); - return *ret ? S_OK : E_OUTOFMEMORY; + HostConstructor *function = (HostConstructor*)func; + + return native_function_string(function->method_name, ret);
It looks like `native_function_string` doesn't really expect a NULL name, it ends up adding an extra space in the prefix. Seems like we're missing a test for this case. Other than that, looks good to me. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7779#note_101820