Commit 5e67f216 authored by Daniele Castagna's avatar Daniele Castagna Committed by Commit Bot

ozone/wayland: Fix wayland_data_device_manager leak

Bug: 855588
Test: ozone_unittests
Change-Id: I29ca5cc777d1e835bb2279959d9a390e2475025d
Reviewed-on: https://chromium-review.googlesource.com/1112961
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarAntonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#569936}
parent 006d80c4
...@@ -16,12 +16,12 @@ WaylandDataDeviceManager::~WaylandDataDeviceManager() = default; ...@@ -16,12 +16,12 @@ WaylandDataDeviceManager::~WaylandDataDeviceManager() = default;
wl_data_device* WaylandDataDeviceManager::GetDevice() { wl_data_device* WaylandDataDeviceManager::GetDevice() {
DCHECK(connection_->seat()); DCHECK(connection_->seat());
return wl_data_device_manager_get_data_device(device_manager_, return wl_data_device_manager_get_data_device(device_manager_.get(),
connection_->seat()); connection_->seat());
} }
wl_data_source* WaylandDataDeviceManager::CreateSource() { wl_data_source* WaylandDataDeviceManager::CreateSource() {
return wl_data_device_manager_create_data_source(device_manager_); return wl_data_device_manager_create_data_source(device_manager_.get());
} }
} // namespace ui } // namespace ui
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/macros.h" #include "base/macros.h"
#include "ui/ozone/platform/wayland/wayland_object.h"
namespace ui { namespace ui {
...@@ -28,7 +29,7 @@ class WaylandDataDeviceManager { ...@@ -28,7 +29,7 @@ class WaylandDataDeviceManager {
} }
private: private:
wl_data_device_manager* device_manager_; wl::Object<wl_data_device_manager> device_manager_;
WaylandConnection* connection_ = nullptr; WaylandConnection* connection_ = nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment