Bug 1345977 - Add unused message to PTestSyncHang to prevent compiler warning. r=billm draft
authorAndrew McCreight <continuation@gmail.com>
Fri, 10 Mar 2017 14:34:19 -0800
changeset 497750 f1399efdf2690b783bb4c60f888bdb6224a948d0
parent 497654 7b19a63862252ffb89bfe1ba79724e76e20fb6f4
child 497780 551ff2e4cae6473a49caa67607054d3fdcbb879d
push id48992
push userbmo:continuation@gmail.com
push dateMon, 13 Mar 2017 20:04:46 +0000
reviewersbillm
bugs1345977
milestone55.0a1
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
ipc/ipdl/test/cxx/PTestSyncHang.ipdl
ipc/ipdl/test/cxx/TestSyncHang.cpp
ipc/ipdl/test/cxx/TestSyncHang.h
--- 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();
     }
 };