Changeset 246058 in webkit


Ignore:
Timestamp:
Jun 4, 2019 3:04:15 AM (5 years ago)
Author:
Carlos Garcia Campos
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.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r246053 r246058  
     12019-06-04  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Crash when re-entering AC mode after r245957
     4        https://bugs.webkit.org/show_bug.cgi?id=198522
     5
     6        Reviewed by Žan Doberšek.
     7
     8        When AcceleratedBackingStoreWayland::displayBuffer() is called and we have already left AC mode, we early
     9        dispatch the image and release it. The problem is that images are reused, so the given image can be the
     10        committed one. In that case we end up freeing it again in the next AcceleratedBackingStoreWayland::paint()
     11        call.
     12
     13        * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
     14        (WebKit::AcceleratedBackingStoreWayland::displayBuffer): Do not release the given image if it's the committed one.
     15
    1162019-06-03  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp

    r245957 r246058  
    205205    if (!m_surfaceID) {
    206206        wpe_view_backend_exportable_fdo_dispatch_frame_complete(m_exportable);
    207         wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image(m_exportable, image);
     207        if (image != m_committedImage)
     208            wpe_view_backend_exportable_fdo_egl_dispatch_release_exported_image(m_exportable, image);
    208209        return;
    209210    }
Note: See TracChangeset for help on using the changeset viewer.