Title: [200046] trunk/Source/WebCore
Revision
200046
Author
be...@igalia.com
Date
2016-04-25 13:48:04 -0700 (Mon, 25 Apr 2016)

Log Message

[GTK] Crashes if DISPLAY is unset
https://bugs.webkit.org/show_bug.cgi?id=156972

Reviewed by Carlos Garcia Campos.

If DISPLAY is unset then m_display will be NULL, crashing WebKit
when XCloseDisplay is called in the PlatformDisplayX11 destructor.

* platform/graphics/x11/PlatformDisplayX11.cpp:
(WebCore::PlatformDisplayX11::~PlatformDisplayX11):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (200045 => 200046)


--- trunk/Source/WebCore/ChangeLog	2016-04-25 20:33:09 UTC (rev 200045)
+++ trunk/Source/WebCore/ChangeLog	2016-04-25 20:48:04 UTC (rev 200046)
@@ -1,3 +1,16 @@
+2016-04-25  Alberto Garcia  <be...@igalia.com>
+
+        [GTK] Crashes if DISPLAY is unset
+        https://bugs.webkit.org/show_bug.cgi?id=156972
+
+        Reviewed by Carlos Garcia Campos.
+
+        If DISPLAY is unset then m_display will be NULL, crashing WebKit
+        when XCloseDisplay is called in the PlatformDisplayX11 destructor.
+
+        * platform/graphics/x11/PlatformDisplayX11.cpp:
+        (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
+
 2016-04-25  Ryan Haddad  <ryanhad...@apple.com>
 
         Update JS bindings test results after r200037

Modified: trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp (200045 => 200046)


--- trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp	2016-04-25 20:33:09 UTC (rev 200045)
+++ trunk/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp	2016-04-25 20:48:04 UTC (rev 200046)
@@ -37,8 +37,8 @@
 
 PlatformDisplayX11::PlatformDisplayX11()
     : m_display(XOpenDisplay(nullptr))
-    , m_ownedDisplay(true)
 {
+    m_ownedDisplay = m_display != nullptr;
 }
 
 PlatformDisplayX11::PlatformDisplayX11(Display* display)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to