Merge lp:~mterry/indicator-appmenu/dont-abort-at-drop-of-hat into lp:indicator-appmenu/0.3

Proposed by Michael Terry
Status: Merged
Merged at revision: 101
Proposed branch: lp:~mterry/indicator-appmenu/dont-abort-at-drop-of-hat
Merge into: lp:indicator-appmenu/0.3
Diff against target: 101 lines (+11/-11)
2 files modified
src/indicator-appmenu.c (+10/-10)
src/window-menus.c (+1/-1)
To merge this branch: bzr merge lp:~mterry/indicator-appmenu/dont-abort-at-drop-of-hat
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+48940@code.launchpad.net

Description of the change

g_error calls abort(), so really shouldn't be used the way it is in indicator-appmenu, especially since it's a module that can take down the whole panel-service. See bug 708041 for an example of this crashing real people's panels.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

 review approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/indicator-appmenu.c'
2--- src/indicator-appmenu.c 2011-02-07 17:02:50 +0000
3+++ src/indicator-appmenu.c 2011-02-08 16:34:28 +0000
4@@ -255,7 +255,7 @@
5
6 node_info = g_dbus_node_info_new_for_xml(_application_menu_registrar, &error);
7 if (error != NULL) {
8- g_error("Unable to parse Application Menu Interface description: %s", error->message);
9+ g_critical("Unable to parse Application Menu Interface description: %s", error->message);
10 g_error_free(error);
11 }
12 }
13@@ -264,7 +264,7 @@
14 interface_info = g_dbus_node_info_lookup_interface(node_info, REG_IFACE);
15
16 if (interface_info == NULL) {
17- g_error("Unable to find interface '" REG_IFACE "'");
18+ g_critical("Unable to find interface '" REG_IFACE "'");
19 }
20 }
21
22@@ -361,7 +361,7 @@
23 &error);
24
25 if (error != NULL) {
26- g_error("Unable to register the object to DBus: %s", error->message);
27+ g_critical("Unable to register the object to DBus: %s", error->message);
28 g_error_free(error);
29 g_bus_unown_name(iapp->owner_id);
30 iapp->owner_id = 0;
31@@ -385,10 +385,10 @@
32 IndicatorAppmenu * iapp = INDICATOR_APPMENU(user_data);
33
34 if (connection == NULL) {
35- g_error("OMG! Unable to get a connection to DBus");
36+ g_critical("OMG! Unable to get a connection to DBus");
37 }
38 else {
39- g_error("Unable to claim the name %s", DBUS_NAME);
40+ g_critical("Unable to claim the name %s", DBUS_NAME);
41 }
42
43 /* We can rest assured no one will register with us, but let's
44@@ -496,7 +496,7 @@
45
46 dbg_node_info = g_dbus_node_info_new_for_xml(_application_menu_renderer, &error);
47 if (error != NULL) {
48- g_error("Unable to parse Application Menu Renderer Interface description: %s", error->message);
49+ g_critical("Unable to parse Application Menu Renderer Interface description: %s", error->message);
50 g_error_free(error);
51 }
52 }
53@@ -505,7 +505,7 @@
54 dbg_interface_info = g_dbus_node_info_lookup_interface(dbg_node_info, DEBUG_IFACE);
55
56 if (dbg_interface_info == NULL) {
57- g_error("Unable to find interface '" DEBUG_IFACE "'");
58+ g_critical("Unable to find interface '" DEBUG_IFACE "'");
59 }
60 }
61
62@@ -538,7 +538,7 @@
63 GDBusConnection * connection = g_bus_get_finish(res, &error);
64
65 if (error != NULL) {
66- g_error("OMG! Unable to get a connection to DBus: %s", error->message);
67+ g_critical("OMG! Unable to get a connection to DBus: %s", error->message);
68 g_error_free(error);
69 return;
70 }
71@@ -563,7 +563,7 @@
72 &error);
73
74 if (error != NULL) {
75- g_error("Unable to register the object to DBus: %s", error->message);
76+ g_critical("Unable to register the object to DBus: %s", error->message);
77 g_error_free(error);
78 return;
79 }
80@@ -612,7 +612,7 @@
81 &error);
82
83 if (error != NULL) {
84- g_error("Unable to send %s signal: %s", name, error->message);
85+ g_critical("Unable to send %s signal: %s", name, error->message);
86 g_error_free(error);
87 return;
88 }
89
90=== modified file 'src/window-menus.c'
91--- src/window-menus.c 2011-02-03 19:23:01 +0000
92+++ src/window-menus.c 2011-02-08 16:34:28 +0000
93@@ -460,7 +460,7 @@
94 }
95
96 if (error != NULL) {
97- g_error("Could not grab DBus proxy for window %u: %s", priv->windowid, error->message);
98+ g_critical("Could not grab DBus proxy for window %u: %s", priv->windowid, error->message);
99 g_error_free(error);
100 return;
101 }

Subscribers

People subscribed via source and target branches