Merge lp:~macslow/notify-osd/fix-1257717 into lp:notify-osd

Proposed by Mirco Müller
Status: Merged
Approved by: Lars Karlitski
Approved revision: 477
Merged at revision: 476
Proposed branch: lp:~macslow/notify-osd/fix-1257717
Merge into: lp:notify-osd
Diff against target: 15 lines (+5/-0)
1 file modified
src/bubble.c (+5/-0)
To merge this branch: bzr merge lp:~macslow/notify-osd/fix-1257717
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+197728@code.launchpad.net

Commit message

Avoid invalid call to g_source_remove() thus fixing LP: #1257717.

Description of the change

Avoid invalid call to g_source_remove() thus fixing LP: #1257717.

To post a comment you must log in.
Revision history for this message
Lars Karlitski (larsu) wrote :

This will leak the timer source when the bubble gets dismissed before it times out. I don't know if that ever happens, but I recommend unsetting priv->timer_id in the callback, just in case:

=== modified file 'src/bubble.c'
--- src/bubble.c 2012-11-26 20:29:43 +0000
+++ src/bubble.c 2013-12-04 15:12:00 +0000
@@ -3038,6 +3038,11 @@
 {
        g_return_val_if_fail (IS_BUBBLE (self), FALSE);

+ /* This function always returns FALSE, which removes the timer
+ * source. Unset priv->timer_id so that we don't call
+ * g_source_remove() on it later. */
+ bubble_set_timer_id (self, 0);
+
        if (GET_PRIVATE (self)->composited)
        {
                bubble_fade_out (self, 300);

review: Disapprove
Revision history for this message
Lars Karlitski (larsu) wrote :

Ah, sorry. I meant "Needs Fixing" of course.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~macslow/notify-osd/fix-1257717 updated
477. By Mirco Müller

Avoid a potential leak of the source, if a bubble gets dismissed before it normally times out.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Lars Karlitski (larsu) wrote :

Cool, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/bubble.c'
2--- src/bubble.c 2012-11-26 20:29:43 +0000
3+++ src/bubble.c 2013-12-04 16:45:31 +0000
4@@ -3038,6 +3038,11 @@
5 {
6 g_return_val_if_fail (IS_BUBBLE (self), FALSE);
7
8+ /* This function always returns FALSE, which removes the timer
9+ * source. Unset priv->timer_id so that we don't call
10+ * g_source_remove() on it later. */
11+ bubble_set_timer_id (self, 0);
12+
13 if (GET_PRIVATE (self)->composited)
14 {
15 bubble_fade_out (self, 300);

Subscribers

People subscribed via source and target branches