[at-spi2-atk/gnome-3-26] Do not return without mutex unlock
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk/gnome-3-26] Do not return without mutex unlock
- Date: Mon, 5 Mar 2018 23:49:49 +0000 (UTC)
commit 0ffcb8662c6ecc59b1fa9005c0b9e35e1336013a
Author: Shinwoo Kim <cinoo kim samsung com>
Date: Tue Feb 20 12:23:23 2018 +0900
Do not return without mutex unlock
It is not possible to use cache,
after child_added_listener(or toplevel_added_listener) returns by calling
g_return_val_if_fail, without g_rec_mutex_unlock.
https://bugzilla.gnome.org/show_bug.cgi?id=793625
atk-adaptor/accessible-cache.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/atk-adaptor/accessible-cache.c b/atk-adaptor/accessible-cache.c
index 5065a00..a52a8e5 100644
--- a/atk-adaptor/accessible-cache.c
+++ b/atk-adaptor/accessible-cache.c
@@ -324,8 +324,6 @@ child_added_listener (GSignalInvocationHint * signal_hint,
const gchar *detail = NULL;
- g_rec_mutex_lock (&cache_mutex);
-
/*
* Ensure that only accessibles already in the cache
* have their signals processed.
@@ -333,6 +331,8 @@ child_added_listener (GSignalInvocationHint * signal_hint,
accessible = ATK_OBJECT (g_value_get_object (¶m_values[0]));
g_return_val_if_fail (ATK_IS_OBJECT (accessible), TRUE);
+ g_rec_mutex_lock (&cache_mutex);
+
if (spi_cache_in (cache, G_OBJECT(accessible)))
{
#ifdef SPI_ATK_DEBUG
@@ -378,10 +378,10 @@ toplevel_added_listener (AtkObject * accessible,
{
SpiCache *cache = spi_global_cache;
- g_rec_mutex_lock (&cache_mutex);
-
g_return_if_fail (ATK_IS_OBJECT (accessible));
+ g_rec_mutex_lock (&cache_mutex);
+
if (spi_cache_in (cache, G_OBJECT(accessible)))
{
#ifdef SPI_ATK_DEBUG
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]