Jacek Caban (@jacek) commented about dlls/mshtml/dispex.c:
if(!create)return E_OUTOFMEMORY;create->iface = constructor_from_DispatchEx(dispex)->iface;create->window = script_global;IHTMLWindow2_AddRef(&script_global->base.IHTMLWindow2_iface);init_dispatch_from_desc(&create->dispex, object_descriptors[id]->constructor_info->info_cache[dispex->info->compat_mode],NULL, NULL);hres = IWineJScript_InitHostConstructor(script_global->jscript, &create->dispex.IWineJSDispatchHost_iface,NULL, NULL, &create->dispex.jsdisp);if(SUCCEEDED(hres))hres = IWineJScript_InitHostConstructor(script_global->jscript, &dispex->IWineJSDispatchHost_iface,prototype->jsdisp, create->dispex.jsdisp, &dispex->jsdisp);IWineJSDispatchHost_Release(&create->dispex.IWineJSDispatchHost_iface);
This is a very specific case, and a special case like this doesn’t really belong in the generic code here. `HTMLXMLHttpRequestFactory_Create` seems like the logical place to handle it instead. That makes me think removing the `init_constructor` logic earlier might not be the right call after all.