From 00a8463181c33d1586b0c4c73c55703a296c6fde Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 2 Feb 2018 16:49:59 +0100 Subject: [PATCH] Fix crash when e10s is disabled and default wl_queue is processed. --- firefox.spec | 7 ++++++- queue-crash.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 queue-crash.patch diff --git a/firefox.spec b/firefox.spec index 9ff131b..806f952 100644 --- a/firefox.spec +++ b/firefox.spec @@ -98,7 +98,7 @@ ExclusiveArch: x86_64 i686 Summary: Mozilla Firefox Web browser Name: firefox Version: 59.0 -Release: 0.7%{?pre_tag}%{?dist} +Release: 0.8%{?pre_tag}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ #Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz @@ -164,6 +164,7 @@ Patch453: mozilla-1433081.patch Patch454: remote-profile.patch Patch455: mozilla-1434572.patch Patch456: mozilla-1434565.patch +Patch457: queue-crash.patch # Debian patches Patch500: mozilla-440908.patch @@ -335,6 +336,7 @@ This package contains results of tests executed during build. %patch454 -p1 -b .remote-profile %patch455 -p1 -b .1434572 %patch456 -p1 -b .1434565 +%patch457 -p1 -b .queue-crash # Patch for big endian platforms only %if 0%{?big_endian} @@ -868,6 +870,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Fri Feb 2 2018 Martin Stransky - 59.0-0.8 +- Fix crash when e10s is disabled and default wl_queue is processed. + * Fri Feb 2 2018 Martin Stransky - 59.0-0.7 - Fixed Firefox X11 desktop file launcher. diff --git a/queue-crash.patch b/queue-crash.patch new file mode 100644 index 0000000..962fce9 --- /dev/null +++ b/queue-crash.patch @@ -0,0 +1,26 @@ +diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp +--- a/widget/gtk/WindowSurfaceWayland.cpp ++++ b/widget/gtk/WindowSurfaceWayland.cpp +@@ -268,17 +268,21 @@ nsWaylandDisplay::GetShm() + + if (!mShm) { + // wl_shm is not provided by Gtk so we need to query wayland directly + // See weston/simple-shm.c and create_display() for reference. + wl_registry* registry = wl_display_get_registry(mDisplay); + wl_registry_add_listener(registry, ®istry_listener, this); + + wl_proxy_set_queue((struct wl_proxy *)registry, mEventQueue); +- wl_display_roundtrip_queue(mDisplay, mEventQueue); ++ if (mEventQueue) { ++ wl_display_roundtrip_queue(mDisplay, mEventQueue); ++ } else { ++ wl_display_roundtrip(mDisplay); ++ } + + MOZ_RELEASE_ASSERT(mShm, "Wayland registry query failed!"); + } + + return(mShm); + } + + bool