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.