Bug 1345977 - Add unused message to PTestSyncHang to prevent compiler warning. r=billm
Adding this unused message prevents a compiler warning
about the private field mState being unused.
Also, get rid of some trailing whitespace.
MozReview-Commit-ID: Lb43JQhIbJU
--- a/ipc/ipdl/test/cxx/PTestSyncHang.ipdl
+++ b/ipc/ipdl/test/cxx/PTestSyncHang.ipdl
@@ -1,15 +1,16 @@
namespace mozilla {
namespace _ipdltest {
protocol PTestSyncHang {
child:
- async __delete__();
-
+ // Add this unused message so we don't get compiler errors
+ // complaining that mState is an unused private field.
+ async UnusedMessage();
};
} // namespace mozilla
} // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestSyncHang.cpp
+++ b/ipc/ipdl/test/cxx/TestSyncHang.cpp
@@ -61,10 +61,16 @@ TestSyncHangChild::TestSyncHangChild()
MOZ_COUNT_CTOR(TestSyncHangChild);
}
TestSyncHangChild::~TestSyncHangChild()
{
MOZ_COUNT_DTOR(TestSyncHangChild);
}
+mozilla::ipc::IPCResult
+TestSyncHangChild::RecvUnusedMessage()
+{
+ return IPC_OK();
+}
+
} // namespace _ipdltest
} // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestSyncHang.h
+++ b/ipc/ipdl/test/cxx/TestSyncHang.h
@@ -18,35 +18,37 @@ public:
virtual ~TestSyncHangParent();
static bool RunTestInProcesses() { return true; }
// FIXME/bug 703323 Could work if modified
static bool RunTestInThreads() { return false; }
void Main();
-protected:
+protected:
virtual void ActorDestroy(ActorDestroyReason why) override
{
if (NormalShutdown != why)
- fail("unexpected destruction!");
+ fail("unexpected destruction!");
passed("ok");
QuitParent();
}
};
class TestSyncHangChild :
public PTestSyncHangChild
{
public:
TestSyncHangChild();
virtual ~TestSyncHangChild();
protected:
+ virtual mozilla::ipc::IPCResult RecvUnusedMessage() override;
+
virtual void ActorDestroy(ActorDestroyReason why) override
{
if (NormalShutdown != why)
fail("unexpected destruction!");
QuitChild();
}
};