[gnome-shell/gnome-3-16] calendar: Disconnect all Notification signals on NotificationMessage destruction
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-16] calendar: Disconnect all Notification signals on NotificationMessage destruction
- Date: Sun, 11 Oct 2015 17:10:43 +0000 (UTC)
commit 8c0a2a128490f33a6011ad521307e93107047810
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Sep 22 17:27:56 2015 +0200
calendar: Disconnect all Notification signals on NotificationMessage destruction
The destroy signal handler is kept connected despite the NotificationMessage
being destroyed, which leaves dangling NotificationMessage objects that will
be mass destroyed when the Notification object these depend upon is finally
destroyed.
Depending on the amount of accumulated NotificationMessages, this may lead
to temporary freezes or other more funky issues when recursion limits are
hit.
https://bugzilla.gnome.org/show_bug.cgi?id=755425
js/ui/calendar.js | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index b571e4c..36f8d36 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1229,7 +1229,7 @@ const NotificationMessage = new Lang.Class({
this._closed = true;
this.notification.destroy(MessageTray.NotificationDestroyedReason.DISMISSED);
}));
- notification.connect('destroy', Lang.bind(this,
+ this._destroyId = notification.connect('destroy', Lang.bind(this,
function() {
if (!this._closed)
this.close();
@@ -1260,6 +1260,10 @@ const NotificationMessage = new Lang.Class({
if (this._updatedId)
this.notification.disconnect(this._updatedId);
this._updatedId = 0;
+
+ if (this._destroyId)
+ this.notification.disconnect(this._destroyId);
+ this._destroyId = 0;
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]