Changeset 229126 in webkit


Ignore:
Timestamp:
Mar 1, 2018 1:24:24 AM (6 years ago)
Author:
Carlos Garcia Campos
Message:

REGRESSION(r221514): [GTK] UI process crash in WebKit::WaylandCompositor::Surface::flushPendingFrameCallbacks
https://bugs.webkit.org/show_bug.cgi?id=183091

Reviewed by Michael Catanzaro.

Invalidate the surface in the page map when the backing store is destroyed.

  • UIProcess/gtk/WaylandCompositor.cpp:

(WebKit::WaylandCompositor::willDestroySurface):

  • UIProcess/gtk/WaylandCompositor.h:
Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r229117 r229126  
     12018-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        REGRESSION(r221514): [GTK] UI process crash in WebKit::WaylandCompositor::Surface::flushPendingFrameCallbacks
     4        https://bugs.webkit.org/show_bug.cgi?id=183091
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Invalidate the surface in the page map when the backing store is destroyed.
     9
     10        * UIProcess/gtk/WaylandCompositor.cpp:
     11        (WebKit::WaylandCompositor::willDestroySurface):
     12        * UIProcess/gtk/WaylandCompositor.h:
     13
    1142018-02-28  Brian Burg  <bburg@apple.com>
    215
  • trunk/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp

    r228590 r229126  
    351351                [](struct wl_resource* resource) {
    352352                    auto* surface = static_cast<WaylandCompositor::Surface*>(wl_resource_get_user_data(resource));
     353                    WaylandCompositor::singleton().willDestroySurface(surface);
    353354                    delete surface;
    354355                });
     
    563564}
    564565
     566void WaylandCompositor::willDestroySurface(Surface* surface)
     567{
     568    for (auto it : m_pageMap) {
     569        if (it.value == surface) {
     570            it.value = nullptr;
     571            return;
     572        }
     573    }
     574}
     575
    565576} // namespace WebKit
    566577
  • trunk/Source/WebKit/UIProcess/gtk/WaylandCompositor.h

    r228021 r229126  
    114114    void registerWebPage(WebPageProxy&);
    115115    void unregisterWebPage(WebPageProxy&);
     116    void willDestroySurface(Surface*);
    116117
    117118    bool getTexture(WebPageProxy&, unsigned&, WebCore::IntSize&);
Note: See TracChangeset for help on using the changeset viewer.