Changeset 208285 in webkit


Ignore:
Timestamp:
Nov 2, 2016 9:35:08 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
https://bugs.webkit.org/show_bug.cgi?id=164303

Reviewed by Michael Catanzaro.

This can happen if the web process exits before the UI process has cleaned up the accelerated surface. Trap
BadDrawable and BadDamage X errors and ignore them, while still crashing for any other X error.

  • UIProcess/gtk/AcceleratedBackingStoreX11.cpp:

(WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
(WebKit::AcceleratedBackingStoreX11::update):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r208278 r208285  
     12016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
     4        https://bugs.webkit.org/show_bug.cgi?id=164303
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        This can happen if the web process exits before the UI process has cleaned up the accelerated surface. Trap
     9        BadDrawable and BadDamage X errors and ignore them, while still crashing for any other X error.
     10
     11        * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
     12        (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
     13        (WebKit::AcceleratedBackingStoreX11::update):
     14
    1152016-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
    216
  • trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreX11.cpp

    r206998 r208285  
    3434#include <WebCore/CairoUtilities.h>
    3535#include <WebCore/PlatformDisplayX11.h>
     36#include <WebCore/XErrorTrapper.h>
    3637#include <X11/Xlib.h>
    3738#include <X11/extensions/Xdamage.h>
     
    117118AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11()
    118119{
     120    if (!m_surface && !m_damage)
     121        return;
     122
     123    Display* display = downcast<PlatformDisplayX11>(PlatformDisplay::sharedDisplay()).native();
     124    XErrorTrapper trapper(display, XErrorTrapper::Policy::Crash, { BadDrawable, BadDamage });
    119125    if (m_damage) {
    120126        XDamageNotifier::singleton().remove(m_damage.get());
    121127        m_damage.reset();
    122         XSync(downcast<PlatformDisplayX11>(PlatformDisplay::sharedDisplay()).native(), False);
     128        XSync(display, False);
    123129    }
    124130}
     
    133139
    134140    if (m_surface) {
     141        XErrorTrapper trapper(display, XErrorTrapper::Policy::Crash, { BadDrawable, BadDamage });
    135142        if (m_damage) {
    136143            XDamageNotifier::singleton().remove(m_damage.get());
Note: See TracChangeset for help on using the changeset viewer.