Title: [246058] trunk/Source/WebKit
Revision
246058
Author
[email protected]
Date
2019-06-04 03:04:15 -0700 (Tue, 04 Jun 2019)

Log Message

[GTK] Crash when re-entering AC mode after r245957
https://bugs.webkit.org/show_bug.cgi?id=198522

Reviewed by Žan Doberšek.

When AcceleratedBackingStoreWayland::displayBuffer() is called and we have already left AC mode, we early
dispatch the image and release it. The problem is that images are reused, so the given image can be the
committed one. In that case we end up freeing it again in the next AcceleratedBackingStoreWayland::paint()
call.

* UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
(WebKit::AcceleratedBackingStoreWayland::displayBuffer): Do not release the given image if it's the committed one.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (246057 => 246058)


--- trunk/Source/WebKit/ChangeLog	2019-06-04 07:38:17 UTC (rev 246057)
+++ trunk/Source/WebKit/ChangeLog	2019-06-04 10:04:15 UTC (rev 246058)
@@ -1,3 +1,18 @@
+2019-06-04  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Crash when re-entering AC mode after r245957
+        https://bugs.webkit.org/show_bug.cgi?id=198522
+
+        Reviewed by Žan Doberšek.
+
+        When AcceleratedBackingStoreWayland::displayBuffer() is called and we have already left AC mode, we early
+        dispatch the image and release it. The problem is that images are reused, so the given image can be the
+        committed one. In that case we end up freeing it again in the next AcceleratedBackingStoreWayland::paint()
+        call.
+
+        * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
+        (WebKit::AcceleratedBackingStoreWayland::displayBuffer): Do not release the given image if it's the committed one.
+
 2019-06-03  Chris Dumez  <[email protected]>
 
         [iOS] Do not prevent app suspension for more than 20 seconds after getting backgrounded

Modified: trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp (246057 => 246058)


--- trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp	2019-06-04 07:38:17 UTC (rev 246057)
+++ trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp	2019-06-04 10:04:15 UTC (rev 246058)
@@ -204,7 +204,8 @@
 {
     if (!m_surfaceID) {
         wpe_view_backend_exportable_fdo_dispatch_frame_complete(m_exportable);
-        wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image(m_exportable, image);
+        if (image != m_committedImage)
+            wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image(m_exportable, image);
         return;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to