gtestdbus: Clarify comment on dropping connection ref

In _g_object_unref_and_wait_weak_notify() we take a weak reference and
then call g_object_unref() in an idle callback, which may look like
we're dropping a strong reference without having one. So change the
comment to make it more clear that the reference being dropped is held
by the caller.
This commit is contained in:
Matthew Leeds 2019-07-02 15:54:52 -07:00
parent 59ce6b10dc
commit d4db5a8288

View File

@ -84,8 +84,9 @@ _g_object_unref_and_wait_weak_notify (gpointer object)
g_object_weak_ref (object, (GWeakNotify) g_main_loop_quit, data.loop);
/* Drop the ref in an idle callback, this is to make sure the mainloop
* is already running when weak notify happens */
/* Drop the strong ref held by the caller in an idle callback. This is to
* make sure the mainloop is already running when weak notify happens (when
* all other strong ref holders have dropped theirs). */
g_idle_add (unref_on_idle, object);
/* Make sure we don't block forever */