GNOME Bugzilla – Bug 755731
Atspi Text Function Fixes
Last modified: 2015-10-13 14:12:46 UTC
Created attachment 312301 [details] [review] Fixed atspi_text Fixed atspi_text_ functions: * atspi_text_get_text_attribute_value$ Fixed dbus signature in _atspi_dbus_call function$ and add missing argument for string.$ * atspi_text_get_default_attributes$ Receiving return value by reference from hash table$
Why this change? @@ -349,7 +353,7 @@ atspi_text_get_default_attributes (AtspiText *obj, GError **error) g_return_val_if_fail (obj != NULL, NULL); reply = _atspi_dbus_call_partial (obj, atspi_interface_text, "GetDefaultAttributes", error, ""); - return _atspi_dbus_return_hash_from_message (reply); + return g_hash_table_ref (_atspi_dbus_return_hash_from_message (reply)); } It should not be needed, since _atspi_dbus_return_hash_from_message ultimately calls g_hash_table_new_full, which returns a hashtable with a ref count of 1, and we don't keep the hash around, so I believe that that change would cause the return value never to be freed even after the caller dereferences it. I've committed your patch, minus that change. I'll leave the bug open for now, since perhaps you added the ref for a reason.
Comment on attachment 312301 [details] [review] Fixed atspi_text Committed, minus the change that I had a question about (see last comment). master: 878684 gnome-3-18: 703990 Thanks for the patches.
Yes you are definitely right, that line is not needed. Thank you for the review.
Okay; closing.