Mir

Merge lp:~vanvugt/mir/fix-1196415 into lp:~mir-team/mir/trunk

Proposed by Daniel van Vugt
Status: Merged
Approved by: Kevin DuBois
Approved revision: no longer in the source branch.
Merged at revision: 797
Proposed branch: lp:~vanvugt/mir/fix-1196415
Merge into: lp:~mir-team/mir/trunk
Diff against target: 85 lines (+16/-5)
5 files modified
include/server/mir/shell/surface.h (+1/-1)
include/test/mir_test_doubles/mock_surface.h (+2/-0)
src/server/shell/surface.cpp (+1/-1)
tests/unit-tests/shell/test_application_session.cpp (+4/-1)
tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp (+8/-2)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1196415
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Kevin DuBois (community) Approve
Alexandros Frantzis (community) Approve
Review via email: mp+172279@code.launchpad.net

Commit message

Fix mismatched destructor exception specifiers causing build failure in
gcc 4.7. Also fix struct/class mismatches that some compilers will treat as
an error. (LP: #1196415)

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This supporting gcc-4.7 is indeed getting irritating for me now. Maybe I'll put gcc 4.8 on the raring machine...

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

+ msh::Surface::~Surface() noexcept

~Surface() can actually throw an exception: ~Surface() -> ... -> SurfaceStack::destroy_surface() -> InputRegistrar::input_surface_closed() -> exception, but this is not a problem with this MP.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

looks good!

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

i've seen that bug with the Input acceptance tests before... I'll file a bug about it (investigated it a bit friday actually) and retrigger landing

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/server/mir/shell/surface.h'
2--- include/server/mir/shell/surface.h 2013-06-28 16:03:05 +0000
3+++ include/server/mir/shell/surface.h 2013-07-01 07:05:36 +0000
4@@ -55,7 +55,7 @@
5 frontend::SurfaceId id,
6 std::shared_ptr<events::EventSink> const& sink);
7
8- ~Surface();
9+ ~Surface() noexcept;
10
11 virtual void hide();
12 virtual void show();
13
14=== modified file 'include/test/mir_test_doubles/mock_surface.h'
15--- include/test/mir_test_doubles/mock_surface.h 2013-06-25 05:42:49 +0000
16+++ include/test/mir_test_doubles/mock_surface.h 2013-07-01 07:05:36 +0000
17@@ -41,6 +41,8 @@
18 {
19 }
20
21+ ~MockSurface() noexcept {}
22+
23 MOCK_METHOD0(hide, void());
24 MOCK_METHOD0(show, void());
25 MOCK_METHOD0(visible, bool());
26
27=== modified file 'src/server/shell/surface.cpp'
28--- src/server/shell/surface.cpp 2013-06-25 19:28:56 +0000
29+++ src/server/shell/surface.cpp 2013-07-01 07:05:36 +0000
30@@ -60,7 +60,7 @@
31 {
32 }
33
34-msh::Surface::~Surface()
35+msh::Surface::~Surface() noexcept
36 {
37 if (surface.lock())
38 {
39
40=== modified file 'tests/unit-tests/shell/test_application_session.cpp'
41--- tests/unit-tests/shell/test_application_session.cpp 2013-06-25 13:19:15 +0000
42+++ tests/unit-tests/shell/test_application_session.cpp 2013-07-01 07:05:36 +0000
43@@ -163,8 +163,11 @@
44 {
45 using namespace ::testing;
46
47- struct MockSnapshotStrategy : public msh::SnapshotStrategy
48+ class MockSnapshotStrategy : public msh::SnapshotStrategy
49 {
50+ public:
51+ ~MockSnapshotStrategy() noexcept {}
52+
53 MOCK_METHOD2(take_snapshot_of,
54 void(std::shared_ptr<msh::SurfaceBufferAccess> const&,
55 msh::SnapshotCallback const&));
56
57=== modified file 'tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp'
58--- tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp 2013-06-25 13:19:14 +0000
59+++ tests/unit-tests/shell/test_threaded_snapshot_strategy.cpp 2013-07-01 07:05:36 +0000
60@@ -37,8 +37,11 @@
61 namespace mtd = mir::test::doubles;
62 namespace geom = mir::geometry;
63
64-struct StubSurfaceBufferAccess : public msh::SurfaceBufferAccess
65+class StubSurfaceBufferAccess : public msh::SurfaceBufferAccess
66 {
67+public:
68+ ~StubSurfaceBufferAccess() noexcept {}
69+
70 void with_most_recent_buffer_do(
71 std::function<void(mc::Buffer&)> const& exec)
72 {
73@@ -48,8 +51,11 @@
74 mtd::StubBuffer buffer;
75 };
76
77-struct MockPixelBuffer : public msh::PixelBuffer
78+class MockPixelBuffer : public msh::PixelBuffer
79 {
80+public:
81+ ~MockPixelBuffer() noexcept {}
82+
83 MOCK_METHOD1(fill_from, void(mc::Buffer& buffer));
84 MOCK_METHOD0(as_argb_8888, void const*());
85 MOCK_CONST_METHOD0(size, geom::Size());

Subscribers

People subscribed via source and target branches