Title: [230390] trunk/Source
Revision
230390
Author
mcatanz...@igalia.com
Date
2018-04-09 00:14:15 -0700 (Mon, 09 Apr 2018)

Log Message

[GTK] WaylandCompositorDisplay leaks its wl_display
https://bugs.webkit.org/show_bug.cgi?id=184406

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Remove the protected default constructor, for good measure.

* platform/graphics/wayland/PlatformDisplayWayland.h:

Source/WebKit:

* WebProcess/gtk/WaylandCompositorDisplay.cpp:
(WebKit::WaylandCompositorDisplay::create): Fix a log message (drive-by).
(WebKit::WaylandCompositorDisplay::WaylandCompositorDisplay): Fix the leak.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (230389 => 230390)


--- trunk/Source/WebCore/ChangeLog	2018-04-09 06:31:05 UTC (rev 230389)
+++ trunk/Source/WebCore/ChangeLog	2018-04-09 07:14:15 UTC (rev 230390)
@@ -1,3 +1,14 @@
+2018-04-09  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        [GTK] WaylandCompositorDisplay leaks its wl_display
+        https://bugs.webkit.org/show_bug.cgi?id=184406
+
+        Reviewed by Carlos Garcia Campos.
+
+        Remove the protected default constructor, for good measure.
+
+        * platform/graphics/wayland/PlatformDisplayWayland.h:
+
 2018-04-08  Fujii Hironori  <hironori.fu...@sony.com>
 
         [CMake] WebKit should link to WebCore as a PRIVATE library if WebCore is a static library

Modified: trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.h (230389 => 230390)


--- trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.h	2018-04-09 06:31:05 UTC (rev 230389)
+++ trunk/Source/WebCore/platform/graphics/wayland/PlatformDisplayWayland.h	2018-04-09 07:14:15 UTC (rev 230390)
@@ -50,7 +50,6 @@
     Type type() const override { return PlatformDisplay::Type::Wayland; }
 
 protected:
-    PlatformDisplayWayland() = default;
     void initialize(struct wl_display*);
 
     virtual void registryGlobal(const char* interface, uint32_t name);

Modified: trunk/Source/WebKit/ChangeLog (230389 => 230390)


--- trunk/Source/WebKit/ChangeLog	2018-04-09 06:31:05 UTC (rev 230389)
+++ trunk/Source/WebKit/ChangeLog	2018-04-09 07:14:15 UTC (rev 230390)
@@ -1,3 +1,14 @@
+2018-04-09  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        [GTK] WaylandCompositorDisplay leaks its wl_display
+        https://bugs.webkit.org/show_bug.cgi?id=184406
+
+        Reviewed by Carlos Garcia Campos.
+
+        * WebProcess/gtk/WaylandCompositorDisplay.cpp:
+        (WebKit::WaylandCompositorDisplay::create): Fix a log message (drive-by).
+        (WebKit::WaylandCompositorDisplay::WaylandCompositorDisplay): Fix the leak.
+
 2018-04-08  Zan Dobersek  <zdober...@igalia.com>
 
         Non-Cocoa ports use default directory for ServiceWorker data during testing

Modified: trunk/Source/WebKit/WebProcess/gtk/WaylandCompositorDisplay.cpp (230389 => 230390)


--- trunk/Source/WebKit/WebProcess/gtk/WaylandCompositorDisplay.cpp	2018-04-09 06:31:05 UTC (rev 230389)
+++ trunk/Source/WebKit/WebProcess/gtk/WaylandCompositorDisplay.cpp	2018-04-09 07:14:15 UTC (rev 230390)
@@ -44,7 +44,7 @@
 
     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());
+        WTFLogAlways("WaylandCompositorDisplay initialization: failed to connect to the Wayland display: %s", displayName.utf8().data());
         return nullptr;
     }
 
@@ -61,8 +61,8 @@
 }
 
 WaylandCompositorDisplay::WaylandCompositorDisplay(struct wl_display* display)
+    : PlatformDisplayWayland(display, NativeDisplayOwned::Yes)
 {
-    initialize(display);
     PlatformDisplay::setSharedDisplayForCompositing(*this);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to