Backport fix for crasher bug BGO #788931 (#1469129)

This commit is contained in:
Adam Williamson 2018-01-22 11:10:19 +01:00
parent d57ad5a6f2
commit 7740fafbf5
2 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,44 @@
From a46af9edf0b99b64501617a1159bc1beb9af218f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Sat, 28 Oct 2017 02:23:02 -0500
Subject: [PATCH] status/keyboard: Reset menuItems and Label objects on change
In the current code it could happen that we've menuItems and indicatorLabels
for sources that aren't anymore around, because in case a source is removed
we don't cleanup the their container objects.
Also, we should nullify InputManager's _currentSource when sources change
or it might point to some invalid data again.
So it could happen that we try to access an invalid menuitem or label
if a source change happens mentioning a source that has been deleted.
https://bugzilla.gnome.org/show_bug.cgi?id=788931
---
js/ui/status/keyboard.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 70e6abf87..b2f10322d 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -529,6 +529,7 @@ var InputSourceManager = new Lang.Class({
let sources = this._settings.inputSources;
let nSources = sources.length;
+ this._currentSource = null;
this._inputSources = {};
this._ibusSources = {};
@@ -827,6 +828,9 @@ var InputSourceIndicator = new Lang.Class({
for (let i in this._indicatorLabels)
this._indicatorLabels[i].destroy();
+ this._menuItems = {};
+ this._indicatorLabels = {};
+
let menuIndex = 0;
for (let i in this._inputSourceManager.inputSources) {
let is = this._inputSourceManager.inputSources[i];
--
2.14.3

View File

@ -1,6 +1,6 @@
Name: gnome-shell
Version: 3.27.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Window management and application launching for GNOME
Group: User Interface/Desktops
@ -13,6 +13,9 @@ Source0: http://download.gnome.org/sources/gnome-shell/3.27/%{name}-%{ver
# Replace Epiphany with Firefox in the default favourite apps list
Patch1: gnome-shell-favourite-apps-firefox.patch
# Backported fix for BGO #788931 / RHBZ #1469129
Patch2: 0001-status-keyboard-Reset-menuItems-and-Label-objects-on.patch
%define gnome_bluetooth_version 1:3.9.0
%define gobject_introspection_version 1.45.4
%define gjs_version 1.47.0
@ -116,6 +119,7 @@ easy to use experience.
%prep
%setup -q
%patch1 -p1 -b .firefox
%patch2 -p1 -b .788931
%build
%meson
@ -181,6 +185,9 @@ glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas &> /dev/null
%{_mandir}/man1/%{name}.1.gz
%changelog
* Mon Jan 22 2018 Adam Williamson <awilliam@redhat.com> - 3.27.1-4
- Backport fix for crasher bug BGO #788931 (#1469129)
* Tue Dec 19 2017 Kalev Lember <klember@redhat.com> - 3.27.1-3
- Explicitly require libnm-gtk (#1509496)