[PATCH 2/2] ole32: Fix refcounting of IObjContext per-thread instance

Nikolay Sivov bunglehead at gmail.com
Mon Mar 14 05:27:08 CDT 2016


On 14.03.2016 13:01, Huw Davies wrote:
> 
> I'm wondering whether this patch could be split since it's doing
> rather more than fixing a ref counting issue.  Could you move the
> constructor to CoGetContextToken first and then fix the refs, or would
> that mess up the tests?

That's exactly what I did initially, it was 3 patches series. And yes,
it breaks tests if separated, which means it's regressing even if for a
brief moment to be fixed by following commit, so I decided to merge them.

One thing I'm a bit worried about is that it's possible for client to
release this shared instance in a first place (and that's how it works
on windows, e.g. if you release pointer returned by CoGetContextToken it
will crash on subsequent method calls. Do we want to replicate that or
maybe it's better to make it more reliable and never destroy on Release,
but only in COM_TlsDestroy()?

> 
> Huw.
> 
> 




More information about the wine-devel mailing list