Changeset 189912 in webkit


Ignore:
Timestamp:
Sep 17, 2015 6:00:48 AM (9 years ago)
Author:
Michael Catanzaro
Message:

[GTK] Crash in WebKit::BackingStore::createBackend running under Wayland
https://bugs.webkit.org/show_bug.cgi?id=147453

Reviewed by Carlos Garcia Campos.

Except when running on X11, this function always crashes if called before the web view is
realized, as gdk_window_create_similar_surface will return null in that case. Avoid this by
simply realizing the widget before calling that.

Thanks to Carlos Garnacho for some debugging help.

  • UIProcess/cairo/BackingStoreCairo.cpp:

(WebKit::BackingStore::createBackend):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r189908 r189912  
     12015-09-17  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [GTK] Crash in WebKit::BackingStore::createBackend running under Wayland
     4        https://bugs.webkit.org/show_bug.cgi?id=147453
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Except when running on X11, this function always crashes if called before the web view is
     9        realized, as gdk_window_create_similar_surface will return null in that case. Avoid this by
     10        simply realizing the widget before calling that.
     11
     12        Thanks to Carlos Garnacho for some debugging help.
     13
     14        * UIProcess/cairo/BackingStoreCairo.cpp:
     15        (WebKit::BackingStore::createBackend):
     16
    1172015-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
    218
  • trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp

    r184197 r189912  
    6464
    6565#if PLATFORM(GTK)
    66     RefPtr<cairo_surface_t> surface = adoptRef(gdk_window_create_similar_surface(gtk_widget_get_window(m_webPageProxy.viewWidget()),
     66    GtkWidget* viewWidget = m_webPageProxy.viewWidget();
     67    gtk_widget_realize(viewWidget);
     68    RefPtr<cairo_surface_t> surface = adoptRef(gdk_window_create_similar_surface(gtk_widget_get_window(viewWidget),
    6769        CAIRO_CONTENT_COLOR_ALPHA, scaledSize.width(), scaledSize.height()));
    6870#else
Note: See TracChangeset for help on using the changeset viewer.