git-fixes.patch 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
  2. index 1880e36..996b363 100644
  3. --- a/js/gdm/authPrompt.js
  4. +++ b/js/gdm/authPrompt.js
  5. @@ -263,10 +263,8 @@ const AuthPrompt = new Lang.Class({
  6. },
  7. _onReset: function() {
  8. - if (this.verificationStatus != AuthPromptStatus.VERIFICATION_SUCCEEDED) {
  9. - this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
  10. - this.reset();
  11. - }
  12. + this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
  13. + this.reset();
  14. },
  15. addActorToDefaultButtonWell: function(actor) {
  16. diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
  17. index eb94554..fb3cf70 100644
  18. --- a/js/gdm/loginDialog.js
  19. +++ b/js/gdm/loginDialog.js
  20. @@ -907,6 +907,10 @@ const LoginDialog = new Lang.Class({
  21. Main.ctrlAltTabManager.removeGroup(this.dialogLayout);
  22. },
  23. + cancel: function() {
  24. + this._authPrompt.cancel();
  25. + },
  26. +
  27. addCharacter: function(unichar) {
  28. this._authPrompt.addCharacter(unichar);
  29. },
  30. diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
  31. index a929451..dde7b82 100644
  32. --- a/js/ui/extensionSystem.js
  33. +++ b/js/ui/extensionSystem.js
  34. @@ -76,7 +76,11 @@ function disableExtension(uuid) {
  35. theme.unload_stylesheet(extension.stylesheet.get_path());
  36. }
  37. - extension.stateObj.disable();
  38. + try {
  39. + extension.stateObj.disable();
  40. + } catch(e) {
  41. + logExtensionError(uuid, e);
  42. + }
  43. for (let i = 0; i < order.length; i++) {
  44. let uuid = order[i];
  45. @@ -89,8 +93,10 @@ function disableExtension(uuid) {
  46. extensionOrder.splice(orderIdx, 1);
  47. - extension.state = ExtensionState.DISABLED;
  48. - _signals.emit('extension-state-changed', extension);
  49. + if ( extension.state != ExtensionState.ERROR ) {
  50. + extension.state = ExtensionState.DISABLED;
  51. + _signals.emit('extension-state-changed', extension);
  52. + }
  53. }
  54. function enableExtension(uuid) {
  55. @@ -117,10 +123,15 @@ function enableExtension(uuid) {
  56. }
  57. }
  58. - extension.stateObj.enable();
  59. -
  60. - extension.state = ExtensionState.ENABLED;
  61. - _signals.emit('extension-state-changed', extension);
  62. + try {
  63. + extension.stateObj.enable();
  64. + extension.state = ExtensionState.ENABLED;
  65. + _signals.emit('extension-state-changed', extension);
  66. + return;
  67. + } catch(e) {
  68. + logExtensionError(uuid, e);
  69. + return;
  70. + }
  71. }
  72. function logExtensionError(uuid, error) {
  73. @@ -150,7 +161,8 @@ function loadExtension(extension) {
  74. } else {
  75. let enabled = enabledExtensions.indexOf(extension.uuid) != -1;
  76. if (enabled) {
  77. - initExtension(extension.uuid);
  78. + if (!initExtension(extension.uuid))
  79. + return;
  80. if (extension.state == ExtensionState.DISABLED)
  81. enableExtension(extension.uuid);
  82. } else {
  83. @@ -205,7 +217,12 @@ function initExtension(uuid) {
  84. extensionModule = extension.imports.extension;
  85. if (extensionModule.init) {
  86. - extensionState = extensionModule.init(extension);
  87. + try {
  88. + extensionState = extensionModule.init(extension);
  89. + } catch(e) {
  90. + logExtensionError(uuid, e);
  91. + return false;
  92. + }
  93. }
  94. if (!extensionState)
  95. @@ -214,6 +231,7 @@ function initExtension(uuid) {
  96. extension.state = ExtensionState.DISABLED;
  97. _signals.emit('extension-loaded', uuid);
  98. + return true;
  99. }
  100. function getEnabledExtensions() {
  101. @@ -235,11 +253,7 @@ function onEnabledExtensionsChanged() {
  102. newEnabledExtensions.filter(function(uuid) {
  103. return enabledExtensions.indexOf(uuid) == -1;
  104. }).forEach(function(uuid) {
  105. - try {
  106. enableExtension(uuid);
  107. - } catch(e) {
  108. - logExtensionError(uuid, e);
  109. - }
  110. });
  111. // Find and disable all the newly disabled extensions: UUIDs found in the
  112. @@ -247,11 +261,7 @@ function onEnabledExtensionsChanged() {
  113. enabledExtensions.filter(function(item) {
  114. return newEnabledExtensions.indexOf(item) == -1;
  115. }).forEach(function(uuid) {
  116. - try {
  117. disableExtension(uuid);
  118. - } catch(e) {
  119. - logExtensionError(uuid, e);
  120. - }
  121. });
  122. enabledExtensions = newEnabledExtensions;
  123. @@ -263,11 +273,7 @@ function _loadExtensions() {
  124. let finder = new ExtensionUtils.ExtensionFinder();
  125. finder.connect('extension-found', function(signals, extension) {
  126. - try {
  127. - loadExtension(extension);
  128. - } catch(e) {
  129. - logExtensionError(extension.uuid, e);
  130. - }
  131. + loadExtension(extension);
  132. });
  133. finder.scanExtensions();
  134. }
  135. diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
  136. index c66c9f6..d290a3d 100644
  137. --- a/js/ui/messageTray.js
  138. +++ b/js/ui/messageTray.js
  139. @@ -2392,6 +2392,13 @@ const MessageTray = new Lang.Class({
  140. // _updateState() figures out what (if anything) needs to be done
  141. // at the present time.
  142. _updateState: function() {
  143. + // If our state changes caused _updateState to be called,
  144. + // just exit now to prevent reentrancy issues.
  145. + if (this._updatingState)
  146. + return;
  147. +
  148. + this._updatingState = true;
  149. +
  150. // Filter out acknowledged notifications.
  151. this._notificationQueue = this._notificationQueue.filter(function(n) {
  152. return !n.acknowledged;
  153. @@ -2474,6 +2481,8 @@ const MessageTray = new Lang.Class({
  154. } else if (desktopCloneIsVisible && !desktopCloneShouldBeVisible) {
  155. this._hideDesktopClone();
  156. }
  157. +
  158. + this._updatingState = false;
  159. },
  160. _tween: function(actor, statevar, value, params) {
  161. @@ -2838,13 +2847,13 @@ const MessageTray = new Lang.Class({
  162. Lang.bind(this, this._onSourceDoneDisplayingContent));
  163. this._summaryBoxPointer.bin.child = child;
  164. - this._grabHelper.grab({ actor: this._summaryBoxPointer.bin.child,
  165. - onUngrab: Lang.bind(this, this._onSummaryBoxPointerUngrabbed) });
  166. -
  167. this._summaryBoxPointer.actor.opacity = 0;
  168. this._summaryBoxPointer.actor.show();
  169. this._adjustSummaryBoxPointerPosition();
  170. + this._grabHelper.grab({ actor: this._summaryBoxPointer.bin.child,
  171. + onUngrab: Lang.bind(this, this._onSummaryBoxPointerUngrabbed) });
  172. +
  173. this._summaryBoxPointerState = State.SHOWING;
  174. this._summaryBoxPointer.show(BoxPointer.PopupAnimation.FULL, Lang.bind(this, function() {
  175. this._summaryBoxPointerState = State.SHOWN;