Skip to content

Commit

Permalink
Merge r230390 - [GTK] WaylandCompositorDisplay leaks its wl_display
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mcatanzaro authored and carlosgcampos committed Apr 9, 2018
1 parent 536bb19 commit 021410f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
11 changes: 11 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,14 @@
2018-04-09 Michael Catanzaro <mcatanzaro@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-05 Zalan Bujtas <zalan@apple.com>

Folding anonymous blocks should not result in deleting content.
Expand Down
Expand Up @@ -50,7 +50,6 @@ class PlatformDisplayWayland : public PlatformDisplay {
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);
Expand Down
11 changes: 11 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,14 @@
2018-04-09 Michael Catanzaro <mcatanzaro@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-06 Brian Burg <bburg@apple.com>

REGRESSION(r228371): WebAutomationSession::deleteAllCookies doesn't delete some cookies
Expand Down
4 changes: 2 additions & 2 deletions Source/WebKit/WebProcess/gtk/WaylandCompositorDisplay.cpp
Expand Up @@ -44,7 +44,7 @@ std::unique_ptr<WaylandCompositorDisplay> WaylandCompositorDisplay::create(const

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;
}

Expand All @@ -61,8 +61,8 @@ void WaylandCompositorDisplay::bindSurfaceToPage(struct wl_surface* surface, Web
}

WaylandCompositorDisplay::WaylandCompositorDisplay(struct wl_display* display)
: PlatformDisplayWayland(display, NativeDisplayOwned::Yes)
{
initialize(display);
PlatformDisplay::setSharedDisplayForCompositing(*this);
}

Expand Down

0 comments on commit 021410f

Please sign in to comment.