summaryrefslogtreecommitdiff
path: root/mozilla-1491824.patch
blob: 4bdca59edf283b6e5ab325d0cf3aab843be0d917 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff -up firefox-62.0.3/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-62.0.3/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium
diff -up firefox-62.0.3/media/webrtc/trunk/Makefile.old firefox-62.0.3/media/webrtc/trunk/Makefile
diff -up firefox-62.0.3/widget/gtk/nsClipboardWayland.cpp.old firefox-62.0.3/widget/gtk/nsClipboardWayland.cpp
--- firefox-62.0.3/widget/gtk/nsClipboardWayland.cpp.old	2018-10-05 12:52:40.067567770 +0200
+++ firefox-62.0.3/widget/gtk/nsClipboardWayland.cpp	2018-09-21 12:39:40.477095989 +0200
@@ -153,7 +153,7 @@ DataOffer::GetData(wl_display* aDisplay,
 
     GIOChannel *channel = g_io_channel_unix_new(pipe_fd[0]);
     GError* error = nullptr;
-    char* clipboardData;
+    char* clipboardData = nullptr;
 
     g_io_channel_set_encoding(channel, nullptr, &error);
     if (!error) {
@@ -470,13 +470,17 @@ nsRetrievalContextWayland::SetClipboardD
     // Delete existing clipboard data offer
     mClipboardOffer = nullptr;
 
-    DataOffer* dataOffer =
-        static_cast<DataOffer*>(g_hash_table_lookup(mActiveOffers,
-                                                    aWaylandDataOffer));
-    NS_ASSERTION(dataOffer, "We're missing clipboard data offer!");
-    if (dataOffer) {
-        g_hash_table_remove(mActiveOffers, aWaylandDataOffer);
-        mClipboardOffer = dataOffer;
+    // null aWaylandDataOffer indicates that our clipboard content
+    // is no longer valid and should be release.
+    if (aWaylandDataOffer != nullptr) {
+        DataOffer* dataOffer =
+            static_cast<DataOffer*>(g_hash_table_lookup(mActiveOffers,
+                                                        aWaylandDataOffer));
+        NS_ASSERTION(dataOffer, "We're missing stored clipboard data offer!");
+        if (dataOffer) {
+            g_hash_table_remove(mActiveOffers, aWaylandDataOffer);
+            mClipboardOffer = dataOffer;
+        }
     }
 }
 
diff -up firefox-62.0.3/widget/gtk/nsClipboardWayland.h.old firefox-62.0.3/widget/gtk/nsClipboardWayland.h
bgstack15