Title: [259962] releases/WebKitGTK/webkit-2.28/Source/WebKit
Revision
259962
Author
carlo...@webkit.org
Date
2020-04-12 06:04:02 -0700 (Sun, 12 Apr 2020)

Log Message

Merge r259044 - [GTK] Crash in WebKit::LayerTreeHost::LayerTreeHost with bubblewrap sandbox enabled
https://bugs.webkit.org/show_bug.cgi?id=209106

Patch by Michael Catanzaro <mcatanz...@gnome.org> on 2020-03-26
Reviewed by Carlos Garcia Campos.

Don't bind the WaylandCompositor socket unless we're running under Wayland and it's actually
started successfully.

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::bindWayland):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog (259961 => 259962)


--- releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog	2020-04-12 13:03:59 UTC (rev 259961)
+++ releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog	2020-04-12 13:04:02 UTC (rev 259962)
@@ -1,3 +1,16 @@
+2020-03-26  Michael Catanzaro  <mcatanz...@gnome.org>
+
+        [GTK] Crash in WebKit::LayerTreeHost::LayerTreeHost with bubblewrap sandbox enabled
+        https://bugs.webkit.org/show_bug.cgi?id=209106
+
+        Reviewed by Carlos Garcia Campos.
+
+        Don't bind the WaylandCompositor socket unless we're running under Wayland and it's actually
+        started successfully.
+
+        * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
+        (WebKit::bindWayland):
+
 2020-03-24  Michael Catanzaro  <mcatanz...@gnome.org>
 
         [GTK] Crash in WebKit::LayerTreeHost::LayerTreeHost with bubblewrap sandbox enabled

Modified: releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp (259961 => 259962)


--- releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp	2020-04-12 13:03:59 UTC (rev 259961)
+++ releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp	2020-04-12 13:04:02 UTC (rev 259962)
@@ -327,6 +327,9 @@
 #if PLATFORM(WAYLAND) && USE(EGL)
 static void bindWayland(Vector<CString>& args)
 {
+    if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::Wayland)
+        return;
+
     const char* display = g_getenv("WAYLAND_DISPLAY");
     if (!display)
         display = "wayland-0";
@@ -335,10 +338,12 @@
     GUniquePtr<char> waylandRuntimeFile(g_build_filename(runtimeDir, display, nullptr));
     bindIfExists(args, waylandRuntimeFile.get(), BindFlags::ReadWrite);
 
-#if PLATFORM(GTK) && !USE(WPE_RENDERER)
-    String displayName = WaylandCompositor::singleton().displayName();
-    waylandRuntimeFile.reset(g_build_filename(runtimeDir, displayName.utf8().data(), nullptr));
-    bindIfExists(args, waylandRuntimeFile.get(), BindFlags::ReadWrite);
+#if !USE(WPE_RENDERER)
+    if (WaylandCompositor::singleton().isRunning()) {
+        String displayName = WaylandCompositor::singleton().displayName();
+        waylandRuntimeFile.reset(g_build_filename(runtimeDir, displayName.utf8().data(), nullptr));
+        bindIfExists(args, waylandRuntimeFile.get(), BindFlags::ReadWrite);
+    }
 #endif
 }
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to