Mir

Merge lp:~alan-griffiths/mir/fix-1718677 into lp:mir

Proposed by Alan Griffiths on 2017-09-21
Status: Rejected
Rejected by: Chris Halse Rogers on 2017-09-25
Proposed branch: lp:~alan-griffiths/mir/fix-1718677
Merge into: lp:mir
Diff against target: 35 lines (+6/-3)
1 file modified
src/server/frontend/wayland/wayland_connector.cpp (+6/-3)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1718677
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve on 2017-09-21
Mir development team 2017-09-21 Pending
Review via email: mp+331152@code.launchpad.net

Commit message

Don't leak WlShellSurface instances (LP: #1718677)

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4259
https://mir-jenkins.ubuntu.com/job/mir-ci/3676/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/5036
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5272
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5260
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5260
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5260
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5079
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5079/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5079
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5079/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5079
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5079/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5079
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5079/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5079
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5079/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5079
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5079/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5079
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5079/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5079
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5079/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3676/rebuild

review: Approve (continuous-integration)

Unmerged revisions

4259. By Alan Griffiths on 2017-09-21

Don't leak WlShellSurface instances

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/server/frontend/wayland/wayland_connector.cpp'
2--- src/server/frontend/wayland/wayland_connector.cpp 2017-09-15 16:34:13 +0000
3+++ src/server/frontend/wayland/wayland_connector.cpp 2017-09-21 16:25:36 +0000
4@@ -1409,7 +1409,7 @@
5 shell->modify_surface(session, id, hide_spec);
6 });
7
8- auto shim = new DestructionShim{session, shell, surface_id};
9+ auto shim = new DestructionShim{session, shell, surface_id, this};
10 shim->destruction_listener.notify = &cleanup_surface;
11 wl_resource_add_destroy_listener(
12 resource,
13@@ -1476,10 +1476,12 @@
14 DestructionShim(
15 std::shared_ptr<mf::Session> const& session,
16 std::shared_ptr<mf::Shell> const& shell,
17- mf::SurfaceId id)
18+ mf::SurfaceId id,
19+ WlShellSurface* self)
20 : session{session},
21 shell{shell},
22- surface_id{id}
23+ surface_id{id},
24+ self{self}
25 {
26 }
27
28@@ -1487,6 +1489,7 @@
29 std::shared_ptr<mf::Shell> const shell;
30 mf::SurfaceId const surface_id;
31 wl_listener destruction_listener;
32+ std::unique_ptr<WlShellSurface> const self;
33 };
34
35 static_assert(

Subscribers

People subscribed via source and target branches