Title: [185252] trunk/Source/WebCore
- Revision
- 185252
- Author
- [email protected]
- Date
- 2015-06-05 10:19:47 -0700 (Fri, 05 Jun 2015)
Log Message
[GTK] [Wayland] The MiniBrowser crashes inside Weston.
https://bugs.webkit.org/show_bug.cgi?id=145645
Reviewed by Žan Doberšek.
No new tests, no behavior changes.
The issue was caused because we were not properly initializing the
Wayland display, and we were returning a nullptr in PlatformDisplayWayland::create(),
therefore a crash was happening on WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1136
<http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp?rev=185245#L1136>
* platform/graphics/wayland/PlatformDisplayWayland.cpp:
(WebCore::PlatformDisplayWayland::create): When connecting to the Wayland
server socket we should use the default value (NULL). This allows the value
to be overwritten at run-time by the environment variables WAYLAND_DISPLAY or
WAYLAND_SOCKET that the Wayland compositor should define. Also add a couple
of warnings to get information about what is going wrong when we fail to
initialize the display instead of just crashing without giving more information.
* platform/graphics/wayland/PlatformDisplayWayland.h:
(WebCore::PlatformDisplayWayland::isInitialized): Not longer check for m_webkitgtk
to signal that the display is ready because the UIProcess embedded Wayland
subcompositer is still not implemented. Added a FIXME note about it.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (185251 => 185252)
--- trunk/Source/WebCore/ChangeLog 2015-06-05 17:19:37 UTC (rev 185251)
+++ trunk/Source/WebCore/ChangeLog 2015-06-05 17:19:47 UTC (rev 185252)
@@ -1,3 +1,29 @@
+2015-06-05 Carlos Alberto Lopez Perez <[email protected]>
+
+ [GTK] [Wayland] The MiniBrowser crashes inside Weston.
+ https://bugs.webkit.org/show_bug.cgi?id=145645
+
+ Reviewed by Žan Doberšek.
+
+ No new tests, no behavior changes.
+
+ The issue was caused because we were not properly initializing the
+ Wayland display, and we were returning a nullptr in PlatformDisplayWayland::create(),
+ therefore a crash was happening on WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1136
+ <http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp?rev=185245#L1136>
+
+ * platform/graphics/wayland/PlatformDisplayWayland.cpp:
+ (WebCore::PlatformDisplayWayland::create): When connecting to the Wayland
+ server socket we should use the default value (NULL). This allows the value
+ to be overwritten at run-time by the environment variables WAYLAND_DISPLAY or
+ WAYLAND_SOCKET that the Wayland compositor should define. Also add a couple
+ of warnings to get information about what is going wrong when we fail to
+ initialize the display instead of just crashing without giving more information.
+ * platform/graphics/wayland/PlatformDisplayWayland.h:
+ (WebCore::PlatformDisplayWayland::isInitialized): Not longer check for m_webkitgtk
+ to signal that the display is ready because the UIProcess embedded Wayland
+ subcompositer is still not implemented. Added a FIXME note about it.
+
2015-06-05 Dean Jackson <[email protected]>
[Mac] Popup focus is cut off
Modified: trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp (185251 => 185252)
--- trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp 2015-06-05 17:19:37 UTC (rev 185251)
+++ trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.cpp 2015-06-05 17:19:47 UTC (rev 185252)
@@ -32,6 +32,7 @@
#include "WaylandSurface.h"
#include <cstring>
#include <glib.h>
+#include <wtf/Assertions.h>
namespace WebCore {
@@ -57,13 +58,17 @@
std::unique_ptr<PlatformDisplayWayland> PlatformDisplayWayland::create()
{
- struct wl_display* wlDisplay = wl_display_connect("webkitgtk-wayland-compositor-socket");
- if (!wlDisplay)
+ struct wl_display* wlDisplay = wl_display_connect(nullptr);
+ if (!wlDisplay) {
+ WTFLogAlways("PlatformDisplayWayland initialization: failed to connect to the Wayland server socket. Check your WAYLAND_DISPLAY or WAYLAND_SOCKET environment variables.");
return nullptr;
+ }
auto display = std::unique_ptr<PlatformDisplayWayland>(new PlatformDisplayWayland(wlDisplay));
- if (!display->isInitialized())
+ if (!display->isInitialized()) {
+ WTFLogAlways("PlatformDisplayWayland initialization: failed to complete the initialization of the display.");
return nullptr;
+ }
return display;
}
Modified: trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.h (185251 => 185252)
--- trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.h 2015-06-05 17:19:37 UTC (rev 185251)
+++ trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.h 2015-06-05 17:19:47 UTC (rev 185252)
@@ -58,8 +58,10 @@
static void globalRemoveCallback(void* data, struct wl_registry*, uint32_t name);
PlatformDisplayWayland(struct wl_display*);
- bool isInitialized() { return m_compositor && m_webkitgtk && m_eglDisplay != EGL_NO_DISPLAY && m_eglConfigChosen; }
+ // FIXME: This should check also for m_webkitgtk once the UIProcess embedded Wayland subcompositer is implemented.
+ bool isInitialized() { return m_compositor && m_eglDisplay != EGL_NO_DISPLAY && m_eglConfigChosen; }
+
Type type() const override { return PlatformDisplay::Type::Wayland; }
struct wl_display* m_display;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes