Title: [208285] trunk/Source/WebKit2
- Revision
- 208285
- Author
- carlo...@webkit.org
- Date
- 2016-11-02 09:35:08 -0700 (Wed, 02 Nov 2016)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (208284 => 208285)
--- trunk/Source/WebKit2/ChangeLog 2016-11-02 16:30:30 UTC (rev 208284)
+++ trunk/Source/WebKit2/ChangeLog 2016-11-02 16:35:08 UTC (rev 208285)
@@ -1,5 +1,19 @@
2016-11-02 Carlos Garcia Campos <cgar...@igalia.com>
+ [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):
+
+2016-11-02 Carlos Garcia Campos <cgar...@igalia.com>
+
[GTK] Remove FileSystem::filenameToString() and use FileSystem::stringFromFileSystemRepresentation() everywhere instead
https://bugs.webkit.org/show_bug.cgi?id=164315
Modified: trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreX11.cpp (208284 => 208285)
--- trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreX11.cpp 2016-11-02 16:30:30 UTC (rev 208284)
+++ trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreX11.cpp 2016-11-02 16:35:08 UTC (rev 208285)
@@ -33,6 +33,7 @@
#include "WebPageProxy.h"
#include <WebCore/CairoUtilities.h>
#include <WebCore/PlatformDisplayX11.h>
+#include <WebCore/XErrorTrapper.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xdamage.h>
#include <cairo-xlib.h>
@@ -116,10 +117,15 @@
AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11()
{
+ if (!m_surface && !m_damage)
+ return;
+
+ Display* display = downcast<PlatformDisplayX11>(PlatformDisplay::sharedDisplay()).native();
+ XErrorTrapper trapper(display, XErrorTrapper::Policy::Crash, { BadDrawable, BadDamage });
if (m_damage) {
XDamageNotifier::singleton().remove(m_damage.get());
m_damage.reset();
- XSync(downcast<PlatformDisplayX11>(PlatformDisplay::sharedDisplay()).native(), False);
+ XSync(display, False);
}
}
@@ -132,6 +138,7 @@
Display* display = downcast<PlatformDisplayX11>(PlatformDisplay::sharedDisplay()).native();
if (m_surface) {
+ XErrorTrapper trapper(display, XErrorTrapper::Policy::Crash, { BadDrawable, BadDamage });
if (m_damage) {
XDamageNotifier::singleton().remove(m_damage.get());
m_damage.reset();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes