fixes a crash when KFileDialog is opened in Firefox and then cancelled (probably boo#1015998) firefox53
authorLubos Lunak <l.lunak@centrum.cz>
Wed, 26 Apr 2017 14:34:14 +0200
branchfirefox53
changeset 965 17fe7b84cafe
parent 964 218a4e337cfe
child 966 8ee745000eea
fixes a crash when KFileDialog is opened in Firefox and then cancelled (probably boo#1015998)
mozilla-kde.patch
--- a/mozilla-kde.patch	Wed Apr 26 14:28:17 2017 +0200
+++ b/mozilla-kde.patch	Wed Apr 26 14:34:14 2017 +0200
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent  2b1505c8ca6fc80da9cf517b029a93c452cb9876
+# Parent  564e9441f71b5bc368c33697428f756f5914eb04
 Description: Add KDE integration to Firefox (toolkit parts)
 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
 Author: Lubos Lunak <lunak@suse.com>
@@ -3325,7 +3325,7 @@
  
    mFilters.AppendElement(filter);
    mFilterNames.AppendElement(name);
-@@ -371,16 +375,32 @@ nsFilePicker::Show(int16_t *aReturn)
+@@ -371,16 +375,34 @@ nsFilePicker::Show(int16_t *aReturn)
  
  NS_IMETHODIMP
  nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
@@ -3339,6 +3339,7 @@
 +    int16_t result;
 +    mCallback = aCallback;
 +    mRunning = true;
++    NS_ADDREF_THIS();
 +    kdeFileDialog(&result);
 +    if (mCallback) {
 +      mCallback->Done(result);
@@ -3347,6 +3348,7 @@
 +      mResult = result;
 +    }
 +    mRunning = false;
++    NS_RELEASE_THIS();
 +    return NS_OK;
 +  }
 +
@@ -3358,7 +3360,7 @@
  
    GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
  
-@@ -603,8 +623,235 @@ nsFilePicker::Done(GtkWidget* file_choos
+@@ -603,8 +625,235 @@ nsFilePicker::Done(GtkWidget* file_choos
    if (mCallback) {
      mCallback->Done(result);
      mCallback = nullptr;