[tizen] Fix deadlock on plug's interfaces for getting size and position 58/92758/1
authorMarcin Niesluchowski <m.niesluchow@samsung.com>
Tue, 18 Oct 2016 10:25:39 +0000 (12:25 +0200)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Tue, 18 Oct 2016 11:41:53 +0000 (13:41 +0200)
Deadlock occured when plug interfaces for getting were accessed position and
size were accessed. Override interfaces for getting plug size and position only
if none were defined.

Change-Id: Ic8a208916cac6479e56552c74f7e2f2730bc7851

atk-adaptor/adaptors/socket-adaptor.c

index ed6faa3..c031d5b 100644 (file)
@@ -180,9 +180,18 @@ impl_Embedded (DBusConnection *bus,
     {
       AtkComponent *component = ATK_COMPONENT (object);
       AtkComponentIface *iface = ATK_COMPONENT_GET_IFACE (component);
-      iface->get_extents = atspi_plug_component_get_extents;
-      iface->get_size = atspi_plug_component_get_size;
-      iface->get_position = atspi_plug_component_get_position;
+      if (!iface->get_extents)
+        {
+          iface->get_extents = atspi_plug_component_get_extents;
+        }
+      if (!iface->get_size)
+        {
+          iface->get_size = atspi_plug_component_get_size;
+        }
+      if (!iface->get_position)
+        {
+          iface->get_position = atspi_plug_component_get_position;
+        }
     }
 
   /* Retrieve some info about the children, if they exist, when