[Bug 55109] GVariant-based factory instantiation

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 28 04:53:19 PST 2014


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

--- Comment #7 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
Comment on attachment 94874
  --> https://bugs.freedesktop.org/attachment.cgi?id=94874
client-factory: take a vardict for new account props

Review of attachment 94874:
 --> (https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=55109&attachment=94874)
-----------------------------------------------------------------

::: telepathy-glib/client-factory.c
@@ +483,4 @@
>  
> +  if (immutable_properties != NULL)
> +    {
> +      g_variant_ref_sink (immutable_properties);

Please sink this *before* passing it to create_account, so that the
create_account vfunc can rely on being called with a non-floating vardict.

(I'd also be tempted to create an empty a{sv} if it's NULL, so the vfunc
doesn't need to cope with NULL.)

::: tests/logger/dbus/test-tpl-log-iter-pidgin.c
@@ +93,4 @@
>  
>    fixture->account = tp_client_factory_ensure_account (fixture->factory,
>        tp_asv_get_string (params, "account-path"),
> +      tp_asv_to_vardict (params),

Leaked. tp_asv_to_vardict() returns a new ref, not a floating ref.

(If you want to change its API, now is the time.)

::: tests/logger/dbus/test-tpl-log-walker.c
@@ +93,4 @@
>  
>    fixture->account = tp_client_factory_ensure_account (fixture->factory,
>        tp_asv_get_string (params, "account-path"),
> +      tp_asv_to_vardict (params),

Leaked.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list