Gabriel Ivăncescu (@insn) commented about dlls/mshtml/mutation.c:
+{ + struct mutation_observer_ctor *This = mutation_observer_ctor_from_DispatchEx(dispex); + VARIANT *callback; + IWineMSHTMLMutationObserver *mutation_observer; + HRESULT hres; + int argc = params->cArgs - params->cNamedArgs; + + TRACE("(%p)->(%lx %x %p %p %p %p)\n", This, lcid, flags, params, res, ei, caller); + + if (argc < 1) + return E_UNEXPECTED; + + if (!res) { + /* This function has no side effects if the return value is dropped. */ + return S_OK; + } Are you sure this should be checked *before* validating `callback`? What happens if you write (in tests):
```jscript MutationObserver(42); ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3391#note_40278