From b2bf73f33fec436f4a6be709ee726a51bf32c591b49b29a45145331df19490b0 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Wed, 3 Jan 2018 13:39:46 +0000 Subject: [PATCH] - fixed regression introduced Oct 10th which made Firefox crash when cancelling the KDE file dialog (boo#1069962) OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=623 --- MozillaFirefox.changes | 6 ++++++ MozillaFirefox.spec | 2 +- mozilla-kde.patch | 8 +++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes index 586d656..c1f55e9 100644 --- a/MozillaFirefox.changes +++ b/MozillaFirefox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 3 08:29:38 UTC 2018 - wr@rosenauer.org + +- fixed regression introduced Oct 10th which made Firefox crash + when cancelling the KDE file dialog (boo#1069962) + ------------------------------------------------------------------- Fri Dec 29 19:52:34 UTC 2017 - astieger@suse.com diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec index f46afc7..ff2e52c 100644 --- a/MozillaFirefox.spec +++ b/MozillaFirefox.spec @@ -1,7 +1,7 @@ # # spec file for package MozillaFirefox # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # 2006-2017 Wolfgang Rosenauer # # All modifications and additions to the file contributed by third parties diff --git a/mozilla-kde.patch b/mozilla-kde.patch index 4aec68b..771fd0b 100644 --- a/mozilla-kde.patch +++ b/mozilla-kde.patch @@ -1,5 +1,5 @@ # HG changeset patch -# Parent 87a32e5d11e9d652e331a5f852bb951069b20c4a +# Parent 2504512f9a9ba7b52dd99745d15f049f2a03f4f4 Description: Add KDE integration to Firefox (toolkit parts) Author: Wolfgang Rosenauer Author: Lubos Lunak @@ -3275,7 +3275,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp mFilters.AppendElement(filter); mFilterNames.AppendElement(name); -@@ -371,16 +375,37 @@ nsFilePicker::Show(int16_t *aReturn) +@@ -371,16 +375,39 @@ nsFilePicker::Show(int16_t *aReturn) NS_IMETHODIMP nsFilePicker::Open(nsIFilePickerShownCallback *aCallback) @@ -3288,6 +3288,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp + if( nsKDEUtils::kdeSupport()) { + mCallback = aCallback; + mRunning = true; ++ NS_ADDREF_THIS(); + g_idle_add([](gpointer data) -> gboolean { + nsFilePicker* queuedPicker = (nsFilePicker*) data; + int16_t result; @@ -3299,6 +3300,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp + queuedPicker->mResult = result; + } + queuedPicker->mRunning = false; ++ NS_RELEASE(queuedPicker); + return G_SOURCE_REMOVE; + }, this); + @@ -3313,7 +3315,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp GtkFileChooserAction action = GetGtkFileChooserAction(mMode); -@@ -603,8 +628,233 @@ nsFilePicker::Done(GtkWidget* file_choos +@@ -603,8 +630,233 @@ nsFilePicker::Done(GtkWidget* file_choos if (mCallback) { mCallback->Done(result); mCallback = nullptr;