Jacek Caban (@jacek) commented about dlls/msxml3/node.c:
WARN("Couldn't locate script element namespace for \"%s\".\n", debugstr_a((char *)prefix));continue;}if (!(language = xmlGetProp(node, BAD_CAST "language")))language = BAD_CAST "javascript";progid = bstr_from_xmlChar(language);if (FAILED(hr = CLSIDFromProgID(progid, &clsid)))WARN("Unknown engine progid %s.\n", debugstr_w(progid));SysFreeString(progid);if (FAILED(hr))return;if (FAILED(hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER,&IID_IActiveScript, (void **)&active_script)))
t looks a bit suspicious. In cases like this, the usual behavior would be to create one engine per script language and share it between all scripts in the same context (and using the same language). Creating a script engine is expensive, and you generally want scripts in the same context to be able to call each other freely and access each other’s properties.
(In more complex hosts, like MSHTML, we also need to allow cross-language access between scripts written in different languages, but that’s probably not a concern here.)