Added workaround for crash when closing application chooser

This commit is contained in:
Jan Horak 2016-02-04 18:07:10 +01:00
parent bf1ae8725b
commit 49904cf08b
2 changed files with 20 additions and 0 deletions

View File

@ -115,6 +115,7 @@ Patch219: rhbz-1173156.patch
Patch220: rhbz-1014858.patch Patch220: rhbz-1014858.patch
Patch221: firefox-fedora-ua.patch Patch221: firefox-fedora-ua.patch
Patch222: firefox-gtk3-20.patch Patch222: firefox-gtk3-20.patch
Patch223: rhbz-1291190-appchooser-crash.patch
# Upstream patches # Upstream patches
Patch300: mozilla-1234026.patch Patch300: mozilla-1234026.patch
@ -265,6 +266,7 @@ cd %{tarballdir}
%if 0%{?fedora} > 23 %if 0%{?fedora} > 23
%patch222 -p1 -b .gtk3-20 %patch222 -p1 -b .gtk3-20
%endif %endif
%patch223 -p1 -b .appchooser-crash
%patch300 -p1 -b .1234026 %patch300 -p1 -b .1234026

View File

@ -0,0 +1,18 @@
diff -up firefox-44.0/widget/gtk/nsApplicationChooser.cpp.appchooser-crash firefox-44.0/widget/gtk/nsApplicationChooser.cpp
--- firefox-44.0/widget/gtk/nsApplicationChooser.cpp.appchooser-crash 2016-01-24 00:23:50.000000000 +0100
+++ firefox-44.0/widget/gtk/nsApplicationChooser.cpp 2016-02-03 17:17:50.891127905 +0100
@@ -112,7 +112,13 @@ void nsApplicationChooser::Done(GtkWidge
// A "response" signal won't be sent again but "destroy" will be.
g_signal_handlers_disconnect_by_func(chooser, FuncToGpointer(OnDestroy), this);
- gtk_widget_destroy(chooser);
+ // GTK 3.18 has a problem with destroying dialog at this stage for some reason.
+ // We're going to hide the dialog in this case as a workaround.
+ if (gtk_major_version == 3 && gtk_minor_version == 18) {
+ gtk_widget_hide(chooser);
+ } else {
+ gtk_widget_destroy(chooser);
+ }
if (mCallback) {
mCallback->Done(localHandler);