Merge lp:~ted/ubuntu-app-launch/lp1495871-unref-context into lp:ubuntu-app-launch/15.04

Proposed by Ted Gould
Status: Superseded
Proposed branch: lp:~ted/ubuntu-app-launch/lp1495871-unref-context
Merge into: lp:ubuntu-app-launch/15.04
Prerequisite: lp:~ted/ubuntu-app-launch/pids-tools-15.04
Diff against target: 57 lines (+12/-3) (has conflicts)
2 files modified
helpers-shared.c (+11/-2)
libubuntu-app-launch/ubuntu-app-launch.h (+1/-1)
Text conflict in debian/libubuntu-app-launch2.symbols
To merge this branch: bzr merge lp:~ted/ubuntu-app-launch/lp1495871-unref-context
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
PS Jenkins bot continuous-integration Pending
Review via email: mp+271371@code.launchpad.net

This proposal supersedes a proposal from 2015-09-16.

This proposal has been superseded by a proposal from 2015-09-16.

Commit message

Ensure all pending events on the context are complete before unref'ing it.

Description of the change

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
215. By Ted Gould

Merge FTBFS

Unmerged revisions

215. By Ted Gould

Merge FTBFS

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'helpers-shared.c'
2--- helpers-shared.c 2015-07-15 02:32:54 +0000
3+++ helpers-shared.c 2015-09-16 20:13:16 +0000
4@@ -145,6 +145,8 @@
5 cgroup_manager_connection_core_cb(g_dbus_connection_new_for_address_finish, res, (cgm_connection_t *)data);
6 }
7
8+G_DEFINE_QUARK(CGMANAGER_CONTEXT, cgmanager_context);
9+
10 /* Get the connection to the cgroup manager */
11 GDBusConnection *
12 cgroup_manager_connection (void)
13@@ -191,7 +193,9 @@
14 g_main_context_pop_thread_default(context);
15
16 if (!use_session_bus && connection.con != NULL) {
17- g_object_set_data(G_OBJECT(connection.con), "cgmanager-context", context);
18+ g_object_set_qdata(G_OBJECT(connection.con),
19+ cgmanager_context_quark(),
20+ context);
21 } else {
22 g_main_context_unref(context);
23 }
24@@ -213,7 +217,7 @@
25 if (cgmanager == NULL)
26 return;
27
28- GMainContext * creationcontext = g_object_get_data(G_OBJECT(cgmanager), "cgmanager-context");
29+ GMainContext * creationcontext = g_object_get_qdata(G_OBJECT(cgmanager), cgmanager_context_quark());
30 if (creationcontext == NULL) {
31 g_object_unref(cgmanager);
32 return;
33@@ -228,6 +232,11 @@
34 }
35
36 g_object_unref(cgmanager);
37+
38+ while (g_main_context_pending(creationcontext)) {
39+ g_main_context_iteration(creationcontext, TRUE /* may block */);
40+ }
41+
42 g_main_context_unref(creationcontext);
43 }
44
45
46=== modified file 'libubuntu-app-launch/ubuntu-app-launch.h'
47--- libubuntu-app-launch/ubuntu-app-launch.h 2015-09-16 20:13:16 +0000
48+++ libubuntu-app-launch/ubuntu-app-launch.h 2015-09-16 20:13:16 +0000
49@@ -394,7 +394,7 @@
50 * Checks to see if an application is running and returns
51 * the PIDs associated with it.
52 *
53- * Return Value: (transfer full) (element-type GLib.Pid) A list
54+ * Return Value: (transfer full) (element-type GLib.Pid): A list
55 * of PIDs associated with @appid, empty if not running.
56 */
57 GList * ubuntu_app_launch_get_pids (const gchar * appid);

Subscribers

People subscribed via source and target branches