mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Merge branch '2312-codegen-test-leak-fix' into 'main'
tests: Fix a leak in gdbus-test-codegen test Closes #2312 See merge request GNOME/glib!2546
This commit is contained in:
commit
1756dde873
@ -23,8 +23,6 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "glib/glib-private.h"
|
||||
|
||||
#include "gdbus-tests.h"
|
||||
|
||||
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_64
|
||||
@ -869,7 +867,7 @@ check_bar_proxy (FooiGenBar *proxy,
|
||||
"s", "a string",
|
||||
"o", "/a/path",
|
||||
"g", "asig",
|
||||
"ay", g_variant_new_parsed ("[byte 0x65, 0x67]"),
|
||||
"ay", "eg",
|
||||
"as", array_of_strings,
|
||||
"ao", array_of_objpaths,
|
||||
"ag", g_variant_new_parsed ("[@g 'ass', 'git']"),
|
||||
@ -1304,18 +1302,6 @@ static gpointer
|
||||
check_proxies_in_thread (gpointer user_data)
|
||||
{
|
||||
GMainLoop *loop = user_data;
|
||||
#ifdef _GLIB_ADDRESS_SANITIZER
|
||||
|
||||
/* Silence "Not available before 2.38" when using old API */
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
g_test_incomplete ("FIXME: Leaks a GWeakRef, see glib#2312");
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
(void) check_thread_proxies;
|
||||
(void) check_authorize_proxy;
|
||||
(void) check_bat_proxy;
|
||||
(void) check_bar_proxy;
|
||||
#else
|
||||
GMainContext *thread_context;
|
||||
GMainLoop *thread_loop;
|
||||
GError *error;
|
||||
@ -1382,9 +1368,14 @@ check_proxies_in_thread (gpointer user_data)
|
||||
g_object_unref (thread_proxy_1);
|
||||
g_object_unref (thread_proxy_2);
|
||||
|
||||
/* Wait for the proxy signals to all be unsubscribed. */
|
||||
while (g_main_context_iteration (thread_context, FALSE))
|
||||
{
|
||||
/* Nothing needs to be done here */
|
||||
}
|
||||
|
||||
g_main_loop_unref (thread_loop);
|
||||
g_main_context_unref (thread_context);
|
||||
#endif
|
||||
|
||||
/* this breaks out of the loop in main() (below) */
|
||||
g_main_loop_quit (loop);
|
||||
|
Loading…
Reference in New Issue
Block a user