gnome-shell/gnome-shell-tray-reentrant.patch
Dominique Leuenberger 5fd6be7a5a Accepting request 208896 from home:dimstar:bnc849913
- Add gnome-shell-hidepassword.patch: authPrompt: propagate gdm
  "reset" signal after user switching. Fixed GDM showing showing
  passwords on user switching (bnc#852490, bgo#710456).
- Add gnome-shell-extensions-disabling.patch: catch more errors on
  extensions enable() and disable(). Fixes gnome-shell extensions
  disabled on screen unlock (bnc#852527, bgo#688331, bgo#719378).
- Add gnome-shell-tray-reentrant.patch: messageTray: Prevent
  reentrancy issues in _updateState (bgo#711694).

OBS-URL: https://build.opensuse.org/request/show/208896
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=196
2013-11-30 16:34:10 +00:00

42 lines
1.4 KiB
Diff

From 43f67399a3964d5204021f1571bf918d2ffe9f89 Mon Sep 17 00:00:00 2001
From: Jasper St. Pierre <jstpierre@mecheye.net>
Date: Fri, 15 Nov 2013 15:34:04 +0000
Subject: messageTray: Prevent reentrancy issues in _updateState
The methods we call in _updateState may not be reentrant, so make
sure that we never get into a situation where _updateState, through
some crazy chain of events, calls itself.
https://bugzilla.gnome.org/show_bug.cgi?id=711694
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index c66c9f6..7a8403c 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2392,6 +2392,13 @@ const MessageTray = new Lang.Class({
// _updateState() figures out what (if anything) needs to be done
// at the present time.
_updateState: function() {
+ // If our state changes caused _updateState to be called,
+ // just exit now to prevent reentrancy issues.
+ if (this._updatingState)
+ return;
+
+ this._updatingState = true;
+
// Filter out acknowledged notifications.
this._notificationQueue = this._notificationQueue.filter(function(n) {
return !n.acknowledged;
@@ -2474,6 +2481,8 @@ const MessageTray = new Lang.Class({
} else if (desktopCloneIsVisible && !desktopCloneShouldBeVisible) {
this._hideDesktopClone();
}
+
+ this._updatingState = false;
},
_tween: function(actor, statevar, value, params) {
--
cgit v0.9.2