[Bug 45554] various modules' GAsyncResults cannot safely be reffed and kept around

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 11 13:16:41 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=45554

--- Comment #12 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-04-11 04:16:41 PDT ---
Created attachment 59798
  --> https://bugs.freedesktop.org/attachment.cgi?id=59798
[2/2] channel-contacts: reverse ownership of ContactsQueueItem  and result

Previously, the ContactsQueueItem assumed that it owned the only
reference to the GSimpleAsyncResult. This could result in the
GSAR still existing after the CQI had been freed, if someone else took
a reference to the GSAR.

Refcounting the CQI would not solve this problem, because then the CQI
and the GSAR would have a cyclic reference.

Instead, change the queue of CQIs into a queue of GSARs, and have the
CQI owned by the GSAR. This means the GSAR's refcounting protects the
CQI from being freed prematurely.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.



More information about the telepathy-bugs mailing list