Title: [219866] trunk/Source/WebKit
Revision
219866
Author
carlo...@webkit.org
Date
2017-07-25 04:38:13 -0700 (Tue, 25 Jul 2017)

Log Message

REGRESSION(r218629): [GTK] ASSERTION FAILED: m_eglDisplay == EGL_NO_DISPLAY in WebCore::PlatformDisplay::~PlatformDisplay
https://bugs.webkit.org/show_bug.cgi?id=174789

Reviewed by Žan Doberšek.

Before r218629, the wayland nested compositor display was a singleton created on demand by
AcceleratedSurfaceWayland, but now it's created unconditionally on web process creation when a valid display
name is received from the UI process. The side effect of this is that now the shared display is created after
the nested compositor display that is not a singleton anymore. The atexit used by PlatformDisplay to shutdown
egl display assumes that it will be registered by the shared display. Since we switched to on demand AC mode,
the shared display is only used in the web process when entering AC mode, that's why it only crashes when we
have entered AC at least once. We just need to ensure that the shared display is created before the nested
compositor display.

* WebProcess/gtk/WaylandCompositorDisplay.cpp:
(WebKit::WaylandCompositorDisplay::create): Check we are under wayland before creating the WaylandCompositorDisplay.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (219865 => 219866)


--- trunk/Source/WebKit/ChangeLog	2017-07-25 11:36:48 UTC (rev 219865)
+++ trunk/Source/WebKit/ChangeLog	2017-07-25 11:38:13 UTC (rev 219866)
@@ -1,3 +1,22 @@
+2017-07-25  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        REGRESSION(r218629): [GTK] ASSERTION FAILED: m_eglDisplay == EGL_NO_DISPLAY in WebCore::PlatformDisplay::~PlatformDisplay
+        https://bugs.webkit.org/show_bug.cgi?id=174789
+
+        Reviewed by Žan Doberšek.
+
+        Before r218629, the wayland nested compositor display was a singleton created on demand by
+        AcceleratedSurfaceWayland, but now it's created unconditionally on web process creation when a valid display
+        name is received from the UI process. The side effect of this is that now the shared display is created after
+        the nested compositor display that is not a singleton anymore. The atexit used by PlatformDisplay to shutdown
+        egl display assumes that it will be registered by the shared display. Since we switched to on demand AC mode,
+        the shared display is only used in the web process when entering AC mode, that's why it only crashes when we
+        have entered AC at least once. We just need to ensure that the shared display is created before the nested
+        compositor display.
+
+        * WebProcess/gtk/WaylandCompositorDisplay.cpp:
+        (WebKit::WaylandCompositorDisplay::create): Check we are under wayland before creating the WaylandCompositorDisplay.
+
 2017-07-24  Michael Catanzaro  <mcatanz...@igalia.com>
 
         [GTK] ASSERTION FAILED: client in WebKit::IconDatabase::setClient

Modified: trunk/Source/WebKit/WebProcess/gtk/WaylandCompositorDisplay.cpp (219865 => 219866)


--- trunk/Source/WebKit/WebProcess/gtk/WaylandCompositorDisplay.cpp	2017-07-25 11:36:48 UTC (rev 219865)
+++ trunk/Source/WebKit/WebProcess/gtk/WaylandCompositorDisplay.cpp	2017-07-25 11:38:13 UTC (rev 219866)
@@ -40,6 +40,9 @@
     if (displayName.isNull())
         return nullptr;
 
+    if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::Wayland)
+        return nullptr;
+
     struct wl_display* display = wl_display_connect(displayName.utf8().data());
     if (!display) {
         WTFLogAlways("PlatformDisplayWayland initialization: failed to connect to the Wayland display: %s", displayName.utf8().data());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to