22 Apr
2025
22 Apr
'25
11:01 p.m.
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) { + HostConstructor *function = (HostConstructor*)func; + + if(function->req_flags) + return native_function_string(L"create", ret);
This hardcodes "create" in several places across all layers, except for the XHR constructor, where the logic arguably belongs. Instead of passing "method" to `InitHostConstructor`, maybe we could pass the method’s name (or NULL for actual constructors) and use that here instead. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7779#note_101665