Jacek Caban (@jacek) commented about dlls/mshtml/editor.c:
return S_OK; doc->nscontainer->usermode = EDITMODE;
- IUnknown_AddRef(doc->outer_unk);
In principle, it's caller responsibility to own a reference to "this-alike" objects. The root of the problem is that when using things like This->doc, it's owned by This object, not the caller. I'd suggest to move that AddRef to callers.