Commit f9b5280d authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

ole32: Implement table-weak marshaling for the free-threaded marshaler.

parent b795631d
......@@ -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,7 +262,8 @@ FTMarshalImpl_UnmarshalInterface (LPMARSHAL iface, IStream * pStm, REFIID riid,
if (hres != S_OK) return STG_E_READFAULT;
hres = IUnknown_QueryInterface(object, riid, ppv);
IUnknown_Release(object);
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment