summaryrefslogtreecommitdiff
path: root/egg
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-08-17 10:49:24 +0200
committerStef Walter <stefw@gnome.org>2013-08-17 10:49:24 +0200
commitdd6aba8b94f90265124b0b11e279677769906bb1 (patch)
tree537138352db86c2164a1f4461946c8817ce806be /egg
parent7924b75e10aa6f8d627f20a8368cb711e54f777e (diff)
downloadgcr-dd6aba8b94f90265124b0b11e279677769906bb1.tar.gz
More reliable means of checking if object was finalized
Don't try to use G_IS_OBJECT() to see if an object was finalized as this segfaults in corner cases, even with our crafty check for a pointer within our memory space. https://bugzilla.gnome.org/show_bug.cgi?id=705139
Diffstat (limited to 'egg')
-rw-r--r--egg/egg-testing.c22
-rw-r--r--egg/egg-testing.h10
2 files changed, 0 insertions, 32 deletions
diff --git a/egg/egg-testing.c b/egg/egg-testing.c
index 2f7aada..805a972 100644
--- a/egg/egg-testing.c
+++ b/egg/egg-testing.c
@@ -108,28 +108,6 @@ egg_assertion_message_cmpmem (const char *domain,
static void (*wait_stop_impl) (void);
static gboolean (*wait_until_impl) (int timeout);
-void
-egg_assertion_not_object (const char *domain,
- const char *file,
- int line,
- const char *func,
- const char *expr,
- gpointer was_object)
-{
- gchar *s;
-
-#ifdef WITH_VALGRIND
- if (RUNNING_ON_VALGRIND)
- return;
-#endif
-
- if (G_IS_OBJECT (was_object)) {
- s = g_strdup_printf ("assertion failed: %s is still referenced", expr);
- g_assertion_message (domain, file, line, func, s);
- g_free (s);
- }
-}
-
#if 0
void
egg_test_wait_stop (void)
diff --git a/egg/egg-testing.h b/egg/egg-testing.h
index a034b15..44c7fb3 100644
--- a/egg/egg-testing.h
+++ b/egg/egg-testing.h
@@ -50,16 +50,6 @@ void egg_assertion_message_cmpmem (const char *domain, const char *
gsize n_arg1, const char *cmp,
gconstpointer arg2, gsize n_arg2);
-#define egg_assert_not_object(p) \
- (egg_assertion_not_object (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #p, (p)))
-
-void egg_assertion_not_object (const char *domain,
- const char *file,
- int line,
- const char *func,
- const char *expr,
- gpointer was_object);
-
gboolean egg_testing_on_valgrind (void);
gchar * egg_test_escape_data (const guchar *data,