IntPtr nsIWeakReference.QueryReferent(ref Guid uuid)
{
IntPtr ppv, pUnk = Marshal.GetIUnknownForObject(this);
Marshal.QueryInterface(pUnk, ref uuid, out ppv);
if (Xpcom.IsMono)
{
// TODO FIXME - remove this hack.
Marshal.AddRef(ppv);
}
Marshal.Release(pUnk);
if (ppv != IntPtr.Zero)
{
Marshal.Release(ppv);
}
return ppv;
}