ole32: Implement table-weak marshaling for the free-threaded marshaler.
This commit is contained in:
parent
b795631daa
commit
f9b5280dd0
@ -191,6 +191,10 @@ FTMarshalImpl_MarshalInterface (LPMARSHAL iface, IStream * pStm, REFIID riid, vo
|
||||
if (FAILED(hres))
|
||||
return hres;
|
||||
|
||||
/* don't hold a reference to table-weak marshaled interfaces */
|
||||
if (mshlflags & MSHLFLAGS_TABLEWEAK)
|
||||
IUnknown_Release((IUnknown *)object);
|
||||
|
||||
hres = IStream_Write (pStm, &mshlflags, sizeof (mshlflags), NULL);
|
||||
if (hres != S_OK) return STG_E_MEDIUMFULL;
|
||||
|
||||
@ -258,6 +262,7 @@ FTMarshalImpl_UnmarshalInterface (LPMARSHAL iface, IStream * pStm, REFIID riid,
|
||||
if (hres != S_OK) return STG_E_READFAULT;
|
||||
|
||||
hres = IUnknown_QueryInterface(object, riid, ppv);
|
||||
if (!(mshlflags & MSHLFLAGS_TABLEWEAK))
|
||||
IUnknown_Release(object);
|
||||
return hres;
|
||||
}
|
||||
|
@ -1734,7 +1734,7 @@ static void test_freethreadedmarshaler(void)
|
||||
MSHLFLAGS_TABLEWEAK);
|
||||
ok_ole_success(hr, IMarshal_MarshalInterface);
|
||||
|
||||
todo_wine ok_no_locks();
|
||||
ok_no_locks();
|
||||
|
||||
test_freethreadedmarshaldata(pStream, MSHCTX_INPROC, &Test_ClassFactory, MSHLFLAGS_TABLEWEAK);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user