Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8
authorAlex Gaynor <agaynor@mozilla.com>
Tue, 26 Feb 2019 15:37:22 +0000
changeset 519072 bba070f5b4d3fad2020a63b1a646374d3052a856
parent 519071 14dc79650c63e7054014f6f8166e0cccbbe2d0b5
child 519073 fec419c7471bcd3d7c2a5cbb4670106323f3252c
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1529686
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1529686 - Part 2 - fixed IPC test protocols to build with devirtualization; r=mccr8 Differential Revision: https://phabricator.services.mozilla.com/D21067
ipc/ipdl/ipdl/direct_call.py
ipc/ipdl/test/cxx/PTestShmem.ipdl
ipc/ipdl/test/cxx/TestActorPunning.h
ipc/ipdl/test/cxx/TestAsyncReturns.h
ipc/ipdl/test/cxx/TestBadActor.h
ipc/ipdl/test/cxx/TestCancel.h
ipc/ipdl/test/cxx/TestCrashCleanup.h
ipc/ipdl/test/cxx/TestDataStructures.h
ipc/ipdl/test/cxx/TestDemon.h
ipc/ipdl/test/cxx/TestDesc.h
ipc/ipdl/test/cxx/TestEndpointBridgeMain.h
ipc/ipdl/test/cxx/TestEndpointOpens.h
ipc/ipdl/test/cxx/TestFailedCtor.h
ipc/ipdl/test/cxx/TestHangs.h
ipc/ipdl/test/cxx/TestHighestPrio.h
ipc/ipdl/test/cxx/TestInterruptErrorCleanup.h
ipc/ipdl/test/cxx/TestInterruptRaces.h
ipc/ipdl/test/cxx/TestInterruptShutdownRace.h
ipc/ipdl/test/cxx/TestJSON.h
ipc/ipdl/test/cxx/TestLatency.h
ipc/ipdl/test/cxx/TestManyChildAllocs.h
ipc/ipdl/test/cxx/TestMultiMgrs.h
ipc/ipdl/test/cxx/TestNestedLoops.h
ipc/ipdl/test/cxx/TestOffMainThreadPainting.h
ipc/ipdl/test/cxx/TestRPC.h
ipc/ipdl/test/cxx/TestRaceDeadlock.h
ipc/ipdl/test/cxx/TestRaceDeferral.h
ipc/ipdl/test/cxx/TestRacyInterruptReplies.h
ipc/ipdl/test/cxx/TestRacyReentry.h
ipc/ipdl/test/cxx/TestRacyUndefer.h
ipc/ipdl/test/cxx/TestSanity.h
ipc/ipdl/test/cxx/TestSelfManageRoot.h
ipc/ipdl/test/cxx/TestShmem.h
ipc/ipdl/test/cxx/TestShutdown.h
ipc/ipdl/test/cxx/TestStackHooks.h
ipc/ipdl/test/cxx/TestSyncError.h
ipc/ipdl/test/cxx/TestSyncHang.h
ipc/ipdl/test/cxx/TestSyncWakeup.h
ipc/ipdl/test/cxx/TestUniquePtrIPC.h
ipc/ipdl/test/cxx/TestUrgency.h
ipc/ipdl/test/cxx/TestUrgentHangs.h
ipc/ipdl/test/cxx/moz.build
--- a/ipc/ipdl/ipdl/direct_call.py
+++ b/ipc/ipdl/ipdl/direct_call.py
@@ -133,16 +133,308 @@ DIRECT_CALL_OVERRIDES = {
     ("PVRGPU", "child"): ("VRGPUChild", "VRGPUChild.h"),
     ("PVRGPU", "parent"): ("VRGPUParent", "VRGPUParent.h"),
     ("PVRLayer", "child"): ("VRLayerChild", "VRLayerChild.h"),
     ("PVRManager", "child"): ("VRManagerChild", "VRManagerChild.h"),
     ("PVRManager", "parent"): ("VRManagerParent", "VRManagerParent.h"),
 
     ("PWebSocket", "child"): ("WebSocketChannelChild", "mozilla/net/WebSocketChannelChild.h"),
     ("PWebSocket", "parent"): ("WebSocketChannelParent", "mozilla/net/WebSocketChannelParent.h"),
+
+    # _ipdltest
+    ("PTestActorPunning", "child"): (
+        "TestActorPunningChild", "mozilla/_ipdltest/TestActorPunning.h"
+    ),
+    ("PTestActorPunning", "parent"): (
+        "TestActorPunningParent", "mozilla/_ipdltest/TestActorPunning.h"
+    ),
+    ("PTestActorPunningPunned", "child"): (
+        "TestActorPunningPunnedChild", "mozilla/_ipdltest/TestActorPunning.h"
+    ),
+    ("PTestActorPunningPunned", "parent"): (
+        "TestActorPunningPunnedParent", "mozilla/_ipdltest/TestActorPunning.h"
+    ),
+    ("PTestActorPunningSub", "child"): (
+        "TestActorPunningSubChild", "mozilla/_ipdltest/TestActorPunning.h"
+    ),
+    ("PTestActorPunningSub", "parent"): (
+        "TestActorPunningSubParent", "mozilla/_ipdltest/TestActorPunning.h"
+    ),
+
+    ("PTestAsyncReturns", "child"): (
+        "TestAsyncReturnsChild", "mozilla/_ipdltest/TestAsyncReturns.h"
+    ),
+    ("PTestAsyncReturns", "parent"): (
+        "TestAsyncReturnsParent", "mozilla/_ipdltest/TestAsyncReturns.h"
+    ),
+
+    ("PTestBadActor", "parent"): ("TestBadActorParent", "mozilla/_ipdltest/TestBadActor.h"),
+    ("PTestBadActor", "child"): ("TestBadActorChild", "mozilla/_ipdltest/TestBadActor.h"),
+    ("PTestBadActorSub", "child"): ("TestBadActorSubChild", "mozilla/_ipdltest/TestBadActor.h"),
+    ("PTestBadActorSub", "parent"): ("TestBadActorSubParent", "mozilla/_ipdltest/TestBadActor.h"),
+
+    ("PTestCancel", "child"): ("TestCancelChild", "mozilla/_ipdltest/TestCancel.h"),
+    ("PTestCancel", "parent"): ("TestCancelParent", "mozilla/_ipdltest/TestCancel.h"),
+
+    ("PTestCrashCleanup", "child"): (
+        "TestCrashCleanupChild", "mozilla/_ipdltest/TestCrashCleanup.h"
+    ),
+    ("PTestCrashCleanup", "parent"): (
+        "TestCrashCleanupParent", "mozilla/_ipdltest/TestCrashCleanup.h"
+    ),
+
+    ("PTestDataStructures", "child"): (
+        "TestDataStructuresChild", "mozilla/_ipdltest/TestDataStructures.h"
+    ),
+    ("PTestDataStructures", "parent"): (
+        "TestDataStructuresParent", "mozilla/_ipdltest/TestDataStructures.h"
+    ),
+    ("PTestDataStructuresSub", "child"): (
+        "TestDataStructuresSub", "mozilla/_ipdltest/TestDataStructures.h"
+    ),
+    ("PTestDataStructuresSub", "parent"): (
+        "TestDataStructuresSub", "mozilla/_ipdltest/TestDataStructures.h"
+    ),
+
+    ("PTestDemon", "child"): ("TestDemonChild", "mozilla/_ipdltest/TestDemon.h"),
+    ("PTestDemon", "parent"): ("TestDemonParent", "mozilla/_ipdltest/TestDemon.h"),
+
+    ("PTestDesc", "child"): ("TestDescChild", "mozilla/_ipdltest/TestDesc.h"),
+    ("PTestDesc", "parent"): ("TestDescParent", "mozilla/_ipdltest/TestDesc.h"),
+    ("PTestDescSub", "child"): ("TestDescSubChild", "mozilla/_ipdltest/TestDesc.h"),
+    ("PTestDescSub", "parent"): ("TestDescSubParent", "mozilla/_ipdltest/TestDesc.h"),
+    ("PTestDescSubsub", "child"): ("TestDescSubsubChild", "mozilla/_ipdltest/TestDesc.h"),
+    ("PTestDescSubsub", "parent"): ("TestDescSubsubParent", "mozilla/_ipdltest/TestDesc.h"),
+
+    ("PTestEndpointBridgeMain", "child"): (
+        "TestEndpointBridgeMainChild", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
+    ),
+    ("PTestEndpointBridgeMain", "parent"): (
+        "TestEndpointBridgeMainParent", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
+    ),
+    ("PTestEndpointBridgeMainSub", "child"): (
+        "TestEndpointBridgeMainSubChild", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
+    ),
+    ("PTestEndpointBridgeMainSub", "parent"): (
+        "TestEndpointBridgeMainSubParent", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
+    ),
+    ("PTestEndpointBridgeSub", "child"): (
+        "TestEndpointBridgeSubChild", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
+    ),
+    ("PTestEndpointBridgeSub", "parent"): (
+        "TestEndpointBridgeSubParent", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
+    ),
+
+    ("PTestEndpointOpens", "child"): (
+        "TestEndpointOpensChild", "mozilla/_ipdltest/TestEndpointOpens.h"
+    ),
+    ("PTestEndpointOpens", "parent"): (
+        "TestEndpointOpensParent", "mozilla/_ipdltest/TestEndpointOpens.h"
+    ),
+    ("PTestEndpointOpensOpened", "child"): (
+        "TestEndpointOpensOpenedChild", "mozilla/_ipdltest/TestEndpointOpens.h"
+    ),
+    ("PTestEndpointOpensOpened", "parent"): (
+        "TestEndpointOpensOpenedParent", "mozilla/_ipdltest/TestEndpointOpens.h"
+    ),
+
+    ("PTestFailedCtor", "child"): ("TestFailedCtorChild", "mozilla/_ipdltest/TestFailedCtor.h"),
+    ("PTestFailedCtor", "parent"): ("TestFailedCtorParent", "mozilla/_ipdltest/TestFailedCtor.h"),
+    ("PTestFailedCtorSub", "child"): (
+        "TestFailedCtorSubChild", "mozilla/_ipdltest/TestFailedCtor.h"
+    ),
+    ("PTestFailedCtorSub", "parent"): (
+        "TestFailedCtorSubParent", "mozilla/_ipdltest/TestFailedCtor.h"
+    ),
+    ("PTestFailedCtorSubsub", "child"): (
+        "TestFailedCtorSubsub", "mozilla/_ipdltest/TestFailedCtor.h"
+    ),
+    ("PTestFailedCtorSubsub", "parent"): (
+        "TestFailedCtorSubsub", "mozilla/_ipdltest/TestFailedCtor.h"
+    ),
+
+    ("PTestHandle", "child"): ("TestHandleChild", "mozilla/_ipdltest/TestJSON.h"),
+    ("PTestHandle", "parent"): ("TestHandleParent", "mozilla/_ipdltest/TestJSON.h"),
+    ("PTestJSON", "child"): ("TestJSONChild", "mozilla/_ipdltest/TestJSON.h"),
+    ("PTestJSON", "parent"): ("TestJSONParent", "mozilla/_ipdltest/TestJSON.h"),
+
+    ("PTestHangs", "child"): ("TestHangsChild", "mozilla/_ipdltest/TestHangs.h"),
+    ("PTestHangs", "parent"): ("TestHangsParent", "mozilla/_ipdltest/TestHangs.h"),
+
+    ("PTestHighestPrio", "child"): ("TestHighestPrioChild", "mozilla/_ipdltest/TestHighestPrio.h"),
+    ("PTestHighestPrio", "parent"): (
+        "TestHighestPrioParent", "mozilla/_ipdltest/TestHighestPrio.h"
+    ),
+
+    ("PTestInterruptErrorCleanup", "child"): (
+        "TestInterruptErrorCleanupChild", "mozilla/_ipdltest/TestInterruptErrorCleanup.h"
+    ),
+    ("PTestInterruptErrorCleanup", "parent"): (
+        "TestInterruptErrorCleanupParent", "mozilla/_ipdltest/TestInterruptErrorCleanup.h"
+    ),
+
+    ("PTestInterruptRaces", "child"): (
+        "TestInterruptRacesChild", "mozilla/_ipdltest/TestInterruptRaces.h"
+    ),
+    ("PTestInterruptRaces", "parent"): (
+        "TestInterruptRacesParent", "mozilla/_ipdltest/TestInterruptRaces.h"
+    ),
+
+    ("PTestInterruptShutdownRace", "child"): (
+        "TestInterruptShutdownRaceChild", "mozilla/_ipdltest/TestInterruptShutdownRace.h"
+    ),
+    ("PTestInterruptShutdownRace", "parent"): (
+        "TestInterruptShutdownRaceParent", "mozilla/_ipdltest/TestInterruptShutdownRace.h"
+    ),
+
+    ("PTestLatency", "child"): ("TestLatencyChild", "mozilla/_ipdltest/TestLatency.h"),
+    ("PTestLatency", "parent"): ("TestLatencyParent", "mozilla/_ipdltest/TestLatency.h"),
+
+    ("PTestLayoutThread", "child"): (
+        "TestOffMainThreadPaintingChild", "mozilla/_ipdltest/TestOffMainThreadPainting.h"
+    ),
+    ("PTestLayoutThread", "parent"): (
+        "TestOffMainThreadPaintingParent", "mozilla/_ipdltest/TestOffMainThreadPainting.h"
+    ),
+    ("PTestPaintThread", "child"): (
+        "TestPaintThreadChild", "mozilla/_ipdltest/TestOffMainThreadPainting.h"
+    ),
+    ("PTestPaintThread", "parent"): (
+        "TestPaintThreadParent", "mozilla/_ipdltest/TestOffMainThreadPainting.h"
+    ),
+
+    ("PTestManyChildAllocs", "child"): (
+        "TestManyChildAllocsChild", "mozilla/_ipdltest/TestManyChildAllocs.h"
+    ),
+    ("PTestManyChildAllocs", "parent"): (
+        "TestManyChildAllocsParent", "mozilla/_ipdltest/TestManyChildAllocs.h"
+    ),
+    ("PTestManyChildAllocsSub", "child"): (
+        "TestManyChildAllocsSubChild", "mozilla/_ipdltest/TestManyChildAllocs.h"
+    ),
+    ("PTestManyChildAllocsSub", "parent"): (
+        "TestManyChildAllocsSubParent", "mozilla/_ipdltest/TestManyChildAllocs.h"
+    ),
+
+    ("PTestMultiMgrs", "child"): ("TestMultiMgrsChild", "mozilla/_ipdltest/TestMultiMgrs.h"),
+    ("PTestMultiMgrs", "parent"): ("TestMultiMgrsParent", "mozilla/_ipdltest/TestMultiMgrs.h"),
+    ("PTestMultiMgrsBottom", "child"): (
+        "TestMultiMgrsBottomChild", "mozilla/_ipdltest/TestMultiMgrs.h"
+    ),
+    ("PTestMultiMgrsBottom", "parent"): (
+        "TestMultiMgrsBottomParent", "mozilla/_ipdltest/TestMultiMgrs.h"
+    ),
+    ("PTestMultiMgrsLeft", "child"): (
+        "TestMultiMgrsLeftChild", "mozilla/_ipdltest/TestMultiMgrs.h"
+    ),
+    ("PTestMultiMgrsLeft", "parent"): (
+        "TestMultiMgrsLeftParent", "mozilla/_ipdltest/TestMultiMgrs.h"
+    ),
+    ("PTestMultiMgrsRight", "child"): (
+        "TestMultiMgrsRightChild", "mozilla/_ipdltest/TestMultiMgrs.h"
+    ),
+    ("PTestMultiMgrsRight", "parent"): (
+        "TestMultiMgrsRightParent", "mozilla/_ipdltest/TestMultiMgrs.h"
+    ),
+
+    ("PTestNestedLoops", "child"): ("TestNestedLoopsChild", "mozilla/_ipdltest/TestNestedLoops.h"),
+    ("PTestNestedLoops", "parent"): (
+        "TestNestedLoopsParent", "mozilla/_ipdltest/TestNestedLoops.h"
+    ),
+
+    ("PTestRaceDeadlock", "child"): (
+        "TestRaceDeadlockChild", "mozilla/_ipdltest/TestRaceDeadlock.h"
+    ),
+    ("PTestRaceDeadlock", "parent"): (
+        "TestRaceDeadlockParent", "mozilla/_ipdltest/TestRaceDeadlock.h"
+    ),
+
+    ("PTestRaceDeferral", "child"): (
+        "TestRaceDeferralChild", "mozilla/_ipdltest/TestRaceDeferral.h"
+    ),
+    ("PTestRaceDeferral", "parent"): (
+        "TestRaceDeferralParent", "mozilla/_ipdltest/TestRaceDeferral.h"
+    ),
+
+    ("PTestRacyInterruptReplies", "child"): (
+        "TestRacyInterruptRepliesChild", "mozilla/_ipdltest/TestRacyInterruptReplies.h"
+    ),
+    ("PTestRacyInterruptReplies", "parent"): (
+        "TestRacyInterruptRepliesParent", "mozilla/_ipdltest/TestRacyInterruptReplies.h"
+    ),
+
+    ("PTestRacyReentry", "child"): ("TestRacyReentryChild", "mozilla/_ipdltest/TestRacyReentry.h"),
+    ("PTestRacyReentry", "parent"): (
+        "TestRacyReentryParent", "mozilla/_ipdltest/TestRacyReentry.h"
+    ),
+
+    ("PTestRacyUndefer", "child"): ("TestRacyUndeferChild", "mozilla/_ipdltest/TestRacyUndefer.h"),
+    ("PTestRacyUndefer", "parent"): (
+        "TestRacyUndeferParent", "mozilla/_ipdltest/TestRacyUndefer.h"
+    ),
+
+    ("PTestRPC", "child"): ("TestRPCChild", "mozilla/_ipdltest/TestRPC.h"),
+    ("PTestRPC", "parent"): ("TestRPCParent", "mozilla/_ipdltest/TestRPC.h"),
+
+    ("PTestSanity", "child"): ("TestSanityChild", "mozilla/_ipdltest/TestSanity.h"),
+    ("PTestSanity", "parent"): ("TestSanityParent", "mozilla/_ipdltest/TestSanity.h"),
+
+    ("PTestSelfManage", "child"): (
+        "TestSelfManageChild", "mozilla/_ipdltest/TestSelfManageRoot.h"
+    ),
+    ("PTestSelfManage", "parent"): (
+        "TestSelfManageParent", "mozilla/_ipdltest/TestSelfManageRoot.h"
+    ),
+    ("PTestSelfManageRoot", "child"): (
+        "TestSelfManageRootChild", "mozilla/_ipdltest/TestSelfManageRoot.h"
+    ),
+    ("PTestSelfManageRoot", "parent"): (
+        "TestSelfManageRootParent", "mozilla/_ipdltest/TestSelfManageRoot.h"
+    ),
+
+    ("PTestShmem", "child"): ("TestShmemChild", "mozilla/_ipdltest/TestShmem.h"),
+    ("PTestShmem", "parent"): ("TestShmemParent", "mozilla/_ipdltest/TestShmem.h"),
+
+    ("PTestShutdown", "child"): ("TestShutdownChild", "mozilla/_ipdltest/TestShutdown.h"),
+    ("PTestShutdown", "parent"): ("TestShutdownParent", "mozilla/_ipdltest/TestShutdown.h"),
+    ("PTestShutdownSub", "child"): ("TestShutdownSubChild", "mozilla/_ipdltest/TestShutdown.h"),
+    ("PTestShutdownSub", "parent"): ("TestShutdownSubParent", "mozilla/_ipdltest/TestShutdown.h"),
+    ("PTestShutdownSubsub", "child"): (
+        "TestShutdownSubsubChild", "mozilla/_ipdltest/TestShutdown.h"
+    ),
+    ("PTestShutdownSubsub", "parent"): (
+        "TestShutdownSubsubParent", "mozilla/_ipdltest/TestShutdown.h"
+    ),
+
+    ("PTestStackHooks", "child"): ("TestStackHooksChild", "mozilla/_ipdltest/TestStackHooks.h"),
+    ("PTestStackHooks", "parent"): ("TestStackHooksParent", "mozilla/_ipdltest/TestStackHooks.h"),
+
+    ("PTestSyncError", "child"): ("TestSyncErrorChild", "mozilla/_ipdltest/TestSyncError.h"),
+    ("PTestSyncError", "parent"): ("TestSyncErrorParent", "mozilla/_ipdltest/TestSyncError.h"),
+
+    ("PTestSyncHang", "child"): ("TestSyncHangChild", "mozilla/_ipdltest/TestSyncHang.h"),
+    ("PTestSyncHang", "parent"): ("TestSyncHangParent", "mozilla/_ipdltest/TestSyncHang.h"),
+
+    ("PTestSyncWakeup", "child"): ("TestSyncWakeupChild", "mozilla/_ipdltest/TestSyncWakeup.h"),
+    ("PTestSyncWakeup", "parent"): ("TestSyncWakeupParent", "mozilla/_ipdltest/TestSyncWakeup.h"),
+
+    ("PTestUniquePtrIPC", "child"): (
+        "TestUniquePtrIPCChild", "mozilla/_ipdltest/TestUniquePtrIPC.h"
+    ),
+    ("PTestUniquePtrIPC", "parent"): (
+        "TestUniquePtrIPCParent", "mozilla/_ipdltest/TestUniquePtrIPC.h"
+    ),
+
+    ("PTestUrgency", "child"): ("TestUrgencyChild", "mozilla/_ipdltest/TestUrgency.h"),
+    ("PTestUrgency", "parent"): ("TestUrgencyParent", "mozilla/_ipdltest/TestUrgency.h"),
+
+    ("PTestUrgentHangs", "child"): ("TestUrgentHangsChild", "mozilla/_ipdltest/TestUrgentHangs.h"),
+    ("PTestUrgentHangs", "parent"): (
+        "TestUrgentHangsParent", "mozilla/_ipdltest/TestUrgentHangs.h"
+    ),
 }
 
 # Our long term goal is to burn this list down, so new entries should be added
 # extremely sparingly and only with a very good reason! You must have an IPC
 # peer's r+ to add something new!
 
 # set() of (Protocol, side)
 VIRTUAL_CALL_CLASSES = set([
@@ -319,9 +611,20 @@ VIRTUAL_CALL_CLASSES = set([
     ("PGMPVideoDecoder", "parent"),
     ("PGMPVideoEncoder", "parent"),
     ("PWebRenderBridge", "parent"),
 
     # Not actually subclassed
     ("PLoginReputation", "child"),
     ("PPluginSurface", "child"),
     ("PTestShellCommand", "child"),
+
+    # _ipdltest
+    # Not actually subclassed
+    ("PTestIndirectProtocolParamFirst", "child"),
+    ("PTestIndirectProtocolParamFirst", "parent"),
+    ("PTestIndirectProtocolParamManage", "child"),
+    ("PTestIndirectProtocolParamManage", "parent"),
+    ("PTestIndirectProtocolParamSecond", "child"),
+    ("PTestIndirectProtocolParamSecond", "parent"),
+    ("PTestPriority", "child"),
+    ("PTestPriority", "parent"),
 ])
--- a/ipc/ipdl/test/cxx/PTestShmem.ipdl
+++ b/ipc/ipdl/test/cxx/PTestShmem.ipdl
@@ -1,17 +1,17 @@
 namespace mozilla {
 namespace _ipdltest {
 
 protocol PTestShmem {
 child:
-    async Give(Shmem mem, Shmem unsafe, size_t expectedSize);
+    async Give(Shmem mem, Shmem unsafe, uint32_t expectedSize);
 
 parent:
-    async Take(Shmem mem, Shmem unsafe, size_t expectedSize);
+    async Take(Shmem mem, Shmem unsafe, uint32_t expectedSize);
     async __delete__();
 
 /*
 state GIVING:
     send Give goto TAKING;
 
 state TAKING:
     recv Take goto TAKING;
--- a/ipc/ipdl/test/cxx/TestActorPunning.h
+++ b/ipc/ipdl/test/cxx/TestActorPunning.h
@@ -9,33 +9,33 @@
 #include "mozilla/_ipdltest/PTestActorPunningChild.h"
 #include "mozilla/_ipdltest/PTestActorPunningPunnedChild.h"
 #include "mozilla/_ipdltest/PTestActorPunningSubChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestActorPunningParent : public PTestActorPunningParent {
+  friend class PTestActorPunningParent;
+
  public:
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
  protected:
-  PTestActorPunningPunnedParent* AllocPTestActorPunningPunnedParent() override;
-  bool DeallocPTestActorPunningPunnedParent(
-      PTestActorPunningPunnedParent* a) override;
+  PTestActorPunningPunnedParent* AllocPTestActorPunningPunnedParent();
+  bool DeallocPTestActorPunningPunnedParent(PTestActorPunningPunnedParent* a);
 
-  PTestActorPunningSubParent* AllocPTestActorPunningSubParent() override;
-  bool DeallocPTestActorPunningSubParent(
-      PTestActorPunningSubParent* a) override;
+  PTestActorPunningSubParent* AllocPTestActorPunningSubParent();
+  bool DeallocPTestActorPunningSubParent(PTestActorPunningSubParent* a);
 
-  virtual mozilla::ipc::IPCResult RecvPun(PTestActorPunningSubParent* a,
-                                          const Bad& bad) override;
+  mozilla::ipc::IPCResult RecvPun(PTestActorPunningSubParent* a,
+                                  const Bad& bad);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown == why) fail("should have died from error!");
     passed("ok");
     QuitParent();
   }
 
   virtual void HandleFatalError(const char* aErrorMsg) const override;
@@ -55,29 +55,30 @@ class TestActorPunningSubParent : public
   TestActorPunningSubParent() {}
   virtual ~TestActorPunningSubParent() {}
 
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override {}
 };
 
 class TestActorPunningChild : public PTestActorPunningChild {
+  friend class PTestActorPunningChild;
+
  public:
   TestActorPunningChild() {}
   virtual ~TestActorPunningChild() {}
 
  protected:
-  PTestActorPunningPunnedChild* AllocPTestActorPunningPunnedChild() override;
-  bool DeallocPTestActorPunningPunnedChild(
-      PTestActorPunningPunnedChild* a) override;
+  PTestActorPunningPunnedChild* AllocPTestActorPunningPunnedChild();
+  bool DeallocPTestActorPunningPunnedChild(PTestActorPunningPunnedChild* a);
 
-  PTestActorPunningSubChild* AllocPTestActorPunningSubChild() override;
-  bool DeallocPTestActorPunningSubChild(PTestActorPunningSubChild* a) override;
+  PTestActorPunningSubChild* AllocPTestActorPunningSubChild();
+  bool DeallocPTestActorPunningSubChild(PTestActorPunningSubChild* a);
 
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     fail("should have been killed off!");
   }
 };
 
 class TestActorPunningPunnedChild : public PTestActorPunningPunnedChild {
  public:
@@ -85,15 +86,15 @@ class TestActorPunningPunnedChild : publ
   virtual ~TestActorPunningPunnedChild() {}
 };
 
 class TestActorPunningSubChild : public PTestActorPunningSubChild {
  public:
   TestActorPunningSubChild() {}
   virtual ~TestActorPunningSubChild() {}
 
-  virtual mozilla::ipc::IPCResult RecvBad() override;
+  mozilla::ipc::IPCResult RecvBad();
 };
 
 }  // namespace _ipdltest
 }  // namespace mozilla
 
 #endif  // ifndef mozilla__ipdltest_TestActorPunning_h
--- a/ipc/ipdl/test/cxx/TestAsyncReturns.h
+++ b/ipc/ipdl/test/cxx/TestAsyncReturns.h
@@ -5,43 +5,47 @@
 
 #include "mozilla/_ipdltest/PTestAsyncReturnsParent.h"
 #include "mozilla/_ipdltest/PTestAsyncReturnsChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestAsyncReturnsParent : public PTestAsyncReturnsParent {
+  friend class PTestAsyncReturnsParent;
+
  public:
   TestAsyncReturnsParent();
   virtual ~TestAsyncReturnsParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  mozilla::ipc::IPCResult RecvPong(PongResolver&& aResolve) override;
+  mozilla::ipc::IPCResult RecvPong(PongResolver&& aResolve);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestAsyncReturnsChild : public PTestAsyncReturnsChild {
+  friend class PTestAsyncReturnsChild;
+
  public:
   TestAsyncReturnsChild();
   virtual ~TestAsyncReturnsChild();
 
  protected:
-  mozilla::ipc::IPCResult RecvPing(PingResolver&& aResolve) override;
-  mozilla::ipc::IPCResult RecvNoReturn(NoReturnResolver&& aResolve) override;
+  mozilla::ipc::IPCResult RecvPing(PingResolver&& aResolve);
+  mozilla::ipc::IPCResult RecvNoReturn(NoReturnResolver&& aResolve);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestBadActor.h
+++ b/ipc/ipdl/test/cxx/TestBadActor.h
@@ -8,16 +8,18 @@
 
 #include "mozilla/_ipdltest/PTestBadActorSubParent.h"
 #include "mozilla/_ipdltest/PTestBadActorSubChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestBadActorParent : public PTestBadActorParent {
+  friend class PTestBadActorParent;
+
  public:
   TestBadActorParent() {}
   virtual ~TestBadActorParent() {}
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
@@ -26,36 +28,39 @@ class TestBadActorParent : public PTestB
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (AbnormalShutdown != why) fail("unexpected destruction");
     passed("ok");
     QuitParent();
   }
 
   virtual void HandleFatalError(const char* aErrorMsg) const override;
 
-  virtual PTestBadActorSubParent* AllocPTestBadActorSubParent() override;
+  PTestBadActorSubParent* AllocPTestBadActorSubParent();
 
-  virtual bool DeallocPTestBadActorSubParent(
-      PTestBadActorSubParent* actor) override {
+  bool DeallocPTestBadActorSubParent(PTestBadActorSubParent* actor) {
     delete actor;
     return true;
   }
 };
 
 class TestBadActorSubParent : public PTestBadActorSubParent {
+  friend class PTestBadActorSubParent;
+
  public:
   TestBadActorSubParent() {}
   virtual ~TestBadActorSubParent() {}
 
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override {}
-  virtual mozilla::ipc::IPCResult RecvPing() override;
+  mozilla::ipc::IPCResult RecvPing();
 };
 
 class TestBadActorChild : public PTestBadActorChild {
+  friend class PTestBadActorChild;
+
  public:
   TestBadActorChild() {}
   virtual ~TestBadActorChild() {}
 
  protected:
   virtual PTestBadActorSubChild* AllocPTestBadActorSubChild();
 
   virtual bool DeallocPTestBadActorSubChild(PTestBadActorSubChild* actor) {
--- a/ipc/ipdl/test/cxx/TestCancel.h
+++ b/ipc/ipdl/test/cxx/TestCancel.h
@@ -14,41 +14,41 @@ class TestCancelParent : public PTestCan
   TestCancelParent();
   virtual ~TestCancelParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
-  virtual mozilla::ipc::IPCResult RecvDone1() override;
-  virtual mozilla::ipc::IPCResult RecvTest2_1() override;
-  virtual mozilla::ipc::IPCResult RecvStart3() override;
-  virtual mozilla::ipc::IPCResult RecvTest3_2() override;
-  virtual mozilla::ipc::IPCResult RecvDone() override;
+  mozilla::ipc::IPCResult RecvDone1();
+  mozilla::ipc::IPCResult RecvTest2_1();
+  mozilla::ipc::IPCResult RecvStart3();
+  mozilla::ipc::IPCResult RecvTest3_2();
+  mozilla::ipc::IPCResult RecvDone();
 
-  virtual mozilla::ipc::IPCResult RecvCheckParent(uint32_t *reply) override;
+  mozilla::ipc::IPCResult RecvCheckParent(uint32_t *reply);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     passed("ok");
     QuitParent();
   }
 };
 
 class TestCancelChild : public PTestCancelChild {
  public:
   TestCancelChild();
   virtual ~TestCancelChild();
 
-  virtual mozilla::ipc::IPCResult RecvTest1_1() override;
-  virtual mozilla::ipc::IPCResult RecvStart2() override;
-  virtual mozilla::ipc::IPCResult RecvTest2_2() override;
-  virtual mozilla::ipc::IPCResult RecvTest3_1() override;
+  mozilla::ipc::IPCResult RecvTest1_1();
+  mozilla::ipc::IPCResult RecvStart2();
+  mozilla::ipc::IPCResult RecvTest2_2();
+  mozilla::ipc::IPCResult RecvTest3_1();
 
-  virtual mozilla::ipc::IPCResult RecvCheckChild(uint32_t *reply) override;
+  mozilla::ipc::IPCResult RecvCheckChild(uint32_t *reply);
 
   virtual void ActorDestroy(ActorDestroyReason why) override { QuitChild(); }
 };
 
 }  // namespace _ipdltest
 }  // namespace mozilla
 
 #endif  // ifndef mozilla__ipdltest_TestCancel_h
--- a/ipc/ipdl/test/cxx/TestCrashCleanup.h
+++ b/ipc/ipdl/test/cxx/TestCrashCleanup.h
@@ -24,22 +24,24 @@ class TestCrashCleanupParent : public PT
     if (AbnormalShutdown != why) fail("unexpected destruction!");
     mCleanedUp = true;
   }
 
   bool mCleanedUp;
 };
 
 class TestCrashCleanupChild : public PTestCrashCleanupChild {
+  friend class PTestCrashCleanupChild;
+
  public:
   TestCrashCleanupChild();
   virtual ~TestCrashCleanupChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult AnswerDIEDIEDIE() override;
+  mozilla::ipc::IPCResult AnswerDIEDIEDIE();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     fail("should have 'crashed'!");
   }
 };
 
 }  // namespace _ipdltest
 }  // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestDataStructures.h
+++ b/ipc/ipdl/test/cxx/TestDataStructures.h
@@ -25,143 +25,131 @@ class TestDataStructuresSub : public PTe
   }
   uint32_t mI;
 };
 
 //-----------------------------------------------------------------------------
 // Main actors
 
 class TestDataStructuresParent : public PTestDataStructuresParent {
+  friend class PTestDataStructuresParent;
+
  public:
   TestDataStructuresParent();
   virtual ~TestDataStructuresParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual PTestDataStructuresSubParent* AllocPTestDataStructuresSubParent(
-      const int& i) override {
+  PTestDataStructuresSubParent* AllocPTestDataStructuresSubParent(
+      const int& i) {
     PTestDataStructuresSubParent* actor = new TestDataStructuresSub(i);
     mKids.AppendElement(actor);
     return actor;
   }
 
-  virtual bool DeallocPTestDataStructuresSubParent(
-      PTestDataStructuresSubParent* actor) override;
+  bool DeallocPTestDataStructuresSubParent(PTestDataStructuresSubParent* actor);
 
-  virtual mozilla::ipc::IPCResult RecvTest1(InfallibleTArray<int>&& i1,
-                                            InfallibleTArray<int>* o1) override;
+  mozilla::ipc::IPCResult RecvTest1(InfallibleTArray<int>&& i1,
+                                    InfallibleTArray<int>* o1);
 
-  virtual mozilla::ipc::IPCResult RecvTest2(
+  mozilla::ipc::IPCResult RecvTest2(
       InfallibleTArray<PTestDataStructuresSubParent*>&& i1,
-      InfallibleTArray<PTestDataStructuresSubParent*>* o1) override;
+      InfallibleTArray<PTestDataStructuresSubParent*>* o1);
 
-  virtual mozilla::ipc::IPCResult RecvTest3(const IntDouble& i1,
-                                            const IntDouble& i2, IntDouble* o1,
-                                            IntDouble* o2) override;
+  mozilla::ipc::IPCResult RecvTest3(const IntDouble& i1, const IntDouble& i2,
+                                    IntDouble* o1, IntDouble* o2);
 
-  virtual mozilla::ipc::IPCResult RecvTest4(
-      InfallibleTArray<IntDouble>&& i1,
-      InfallibleTArray<IntDouble>* o1) override;
+  mozilla::ipc::IPCResult RecvTest4(InfallibleTArray<IntDouble>&& i1,
+                                    InfallibleTArray<IntDouble>* o1);
 
-  virtual mozilla::ipc::IPCResult RecvTest5(const IntDoubleArrays& i1,
-                                            const IntDoubleArrays& i2,
-                                            const IntDoubleArrays& i3,
-                                            IntDoubleArrays* o1,
-                                            IntDoubleArrays* o2,
-                                            IntDoubleArrays* o3) override;
+  mozilla::ipc::IPCResult RecvTest5(const IntDoubleArrays& i1,
+                                    const IntDoubleArrays& i2,
+                                    const IntDoubleArrays& i3,
+                                    IntDoubleArrays* o1, IntDoubleArrays* o2,
+                                    IntDoubleArrays* o3);
 
-  virtual mozilla::ipc::IPCResult RecvTest6(
-      InfallibleTArray<IntDoubleArrays>&& i1,
-      InfallibleTArray<IntDoubleArrays>* o1) override;
+  mozilla::ipc::IPCResult RecvTest6(InfallibleTArray<IntDoubleArrays>&& i1,
+                                    InfallibleTArray<IntDoubleArrays>* o1);
+
+  mozilla::ipc::IPCResult RecvTest7_0(const ActorWrapper& i1, ActorWrapper* o1);
 
-  virtual mozilla::ipc::IPCResult RecvTest7_0(const ActorWrapper& i1,
-                                              ActorWrapper* o1) override;
-
-  virtual mozilla::ipc::IPCResult RecvTest7(const Actors& i1, const Actors& i2,
-                                            const Actors& i3, Actors* o1,
-                                            Actors* o2, Actors* o3) override;
+  mozilla::ipc::IPCResult RecvTest7(const Actors& i1, const Actors& i2,
+                                    const Actors& i3, Actors* o1, Actors* o2,
+                                    Actors* o3);
 
-  virtual mozilla::ipc::IPCResult RecvTest8(
-      InfallibleTArray<Actors>&& i1, InfallibleTArray<Actors>* o1) override;
+  mozilla::ipc::IPCResult RecvTest8(InfallibleTArray<Actors>&& i1,
+                                    InfallibleTArray<Actors>* o1);
 
-  virtual mozilla::ipc::IPCResult RecvTest9(const Unions& i1, const Unions& i2,
-                                            const Unions& i3, const Unions& i4,
-                                            Unions* o1, Unions* o2, Unions* o3,
-                                            Unions* o4) override;
+  mozilla::ipc::IPCResult RecvTest9(const Unions& i1, const Unions& i2,
+                                    const Unions& i3, const Unions& i4,
+                                    Unions* o1, Unions* o2, Unions* o3,
+                                    Unions* o4);
 
-  virtual mozilla::ipc::IPCResult RecvTest10(
-      InfallibleTArray<Unions>&& i1, InfallibleTArray<Unions>* o1) override;
+  mozilla::ipc::IPCResult RecvTest10(InfallibleTArray<Unions>&& i1,
+                                     InfallibleTArray<Unions>* o1);
 
-  virtual mozilla::ipc::IPCResult RecvTest11(const SIntDouble& i,
-                                             SIntDouble* o) override;
+  mozilla::ipc::IPCResult RecvTest11(const SIntDouble& i, SIntDouble* o);
 
-  virtual mozilla::ipc::IPCResult RecvTest12(const SIntDoubleArrays& i,
-                                             SIntDoubleArrays* o) override;
+  mozilla::ipc::IPCResult RecvTest12(const SIntDoubleArrays& i,
+                                     SIntDoubleArrays* o);
 
-  virtual mozilla::ipc::IPCResult RecvTest13(const SActors& i,
-                                             SActors* o) override;
+  mozilla::ipc::IPCResult RecvTest13(const SActors& i, SActors* o);
 
-  virtual mozilla::ipc::IPCResult RecvTest14(const Structs& i,
-                                             Structs* o) override;
+  mozilla::ipc::IPCResult RecvTest14(const Structs& i, Structs* o);
 
-  virtual mozilla::ipc::IPCResult RecvTest15(
+  mozilla::ipc::IPCResult RecvTest15(
       const WithStructs& i1, const WithStructs& i2, const WithStructs& i3,
       const WithStructs& i4, const WithStructs& i5, WithStructs* o1,
-      WithStructs* o2, WithStructs* o3, WithStructs* o4,
-      WithStructs* o5) override;
+      WithStructs* o2, WithStructs* o3, WithStructs* o4, WithStructs* o5);
 
-  virtual mozilla::ipc::IPCResult RecvTest16(const WithUnions& i,
-                                             WithUnions* o) override;
+  mozilla::ipc::IPCResult RecvTest16(const WithUnions& i, WithUnions* o);
 
-  virtual mozilla::ipc::IPCResult RecvTest17(
-      InfallibleTArray<Op>&& sa) override;
+  mozilla::ipc::IPCResult RecvTest17(InfallibleTArray<Op>&& sa);
 
-  virtual mozilla::ipc::IPCResult RecvTest18(
-      InfallibleTArray<nsIntRegion>&& ra) override;
+  mozilla::ipc::IPCResult RecvTest18(InfallibleTArray<nsIntRegion>&& ra);
 
-  virtual mozilla::ipc::IPCResult RecvDummy(const ShmemUnion& su,
-                                            ShmemUnion* rsu) override {
+  mozilla::ipc::IPCResult RecvDummy(const ShmemUnion& su, ShmemUnion* rsu) {
     *rsu = su;
     return IPC_OK();
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 
  private:
   InfallibleTArray<PTestDataStructuresSubParent*> mKids;
 };
 
 class TestDataStructuresChild : public PTestDataStructuresChild {
+  friend class PTestDataStructuresChild;
+
  public:
   TestDataStructuresChild();
   virtual ~TestDataStructuresChild();
 
  protected:
-  virtual PTestDataStructuresSubChild* AllocPTestDataStructuresSubChild(
-      const int& i) override {
+  PTestDataStructuresSubChild* AllocPTestDataStructuresSubChild(const int& i) {
     PTestDataStructuresSubChild* actor = new TestDataStructuresSub(i);
     mKids.AppendElement(actor);
     return actor;
   }
 
-  virtual bool DeallocPTestDataStructuresSubChild(
-      PTestDataStructuresSubChild* actor) override {
+  bool DeallocPTestDataStructuresSubChild(PTestDataStructuresSubChild* actor) {
     delete actor;
     return true;
   }
 
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 
  private:
   void Test1();
--- a/ipc/ipdl/test/cxx/TestDemon.h
+++ b/ipc/ipdl/test/cxx/TestDemon.h
@@ -24,22 +24,22 @@ class TestDemonParent : public PTestDemo
 #ifdef DEBUG
   bool ShouldContinueFromReplyTimeout() override;
   bool ArtificialTimeout() override;
 
   bool NeedArtificialSleep() override { return true; }
   void ArtificialSleep() override;
 #endif
 
-  mozilla::ipc::IPCResult RecvAsyncMessage(const int& n) override;
-  mozilla::ipc::IPCResult RecvHiPrioSyncMessage() override;
+  mozilla::ipc::IPCResult RecvAsyncMessage(const int& n);
+  mozilla::ipc::IPCResult RecvHiPrioSyncMessage();
 
-  mozilla::ipc::IPCResult RecvSyncMessage(const int& n) override;
-  mozilla::ipc::IPCResult RecvUrgentAsyncMessage(const int& n) override;
-  mozilla::ipc::IPCResult RecvUrgentSyncMessage(const int& n) override;
+  mozilla::ipc::IPCResult RecvSyncMessage(const int& n);
+  mozilla::ipc::IPCResult RecvUrgentAsyncMessage(const int& n);
+  mozilla::ipc::IPCResult RecvUrgentSyncMessage(const int& n);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     mDone = true;
     printf("Parent ActorDestroy\n");
     passed("ok");
     QuitParent();
   }
 
@@ -57,25 +57,25 @@ class TestDemonParent : public PTestDemo
   bool DoAction(int flags = 0);
 };
 
 class TestDemonChild : public PTestDemonChild {
  public:
   TestDemonChild();
   virtual ~TestDemonChild();
 
-  mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
 #ifdef DEBUG
   bool NeedArtificialSleep() override { return true; }
   void ArtificialSleep() override;
 #endif
 
-  mozilla::ipc::IPCResult RecvAsyncMessage(const int& n) override;
-  mozilla::ipc::IPCResult RecvHiPrioSyncMessage() override;
+  mozilla::ipc::IPCResult RecvAsyncMessage(const int& n);
+  mozilla::ipc::IPCResult RecvHiPrioSyncMessage();
 
   virtual void ActorDestroy(ActorDestroyReason why) override { _exit(0); }
 
   virtual void IntentionalCrash() override { _exit(0); }
 
  private:
   int mIncoming[3];
   int mOutgoing[3];
--- a/ipc/ipdl/test/cxx/TestDesc.h
+++ b/ipc/ipdl/test/cxx/TestDesc.h
@@ -14,82 +14,86 @@
 
 namespace mozilla {
 namespace _ipdltest {
 
 //-----------------------------------------------------------------------------
 // Top-level
 //
 class TestDescParent : public PTestDescParent {
+  friend class PTestDescParent;
+
  public:
   TestDescParent() {}
   virtual ~TestDescParent() {}
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
-  virtual mozilla::ipc::IPCResult RecvOk(PTestDescSubsubParent* a) override;
+  mozilla::ipc::IPCResult RecvOk(PTestDescSubsubParent* a);
 
  protected:
-  virtual PTestDescSubParent* AllocPTestDescSubParent(
-      PTestDescSubsubParent*) override;
-  virtual bool DeallocPTestDescSubParent(PTestDescSubParent* actor) override;
+  PTestDescSubParent* AllocPTestDescSubParent(PTestDescSubsubParent*);
+  bool DeallocPTestDescSubParent(PTestDescSubParent* actor);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestDescChild : public PTestDescChild {
+  friend class PTestDescChild;
+
  public:
   TestDescChild() {}
   virtual ~TestDescChild() {}
 
  protected:
-  virtual PTestDescSubChild* AllocPTestDescSubChild(
-      PTestDescSubsubChild*) override;
+  PTestDescSubChild* AllocPTestDescSubChild(PTestDescSubsubChild*);
 
-  virtual bool DeallocPTestDescSubChild(PTestDescSubChild* actor) override;
+  bool DeallocPTestDescSubChild(PTestDescSubChild* actor);
 
-  virtual mozilla::ipc::IPCResult RecvTest(PTestDescSubsubChild* a) override;
+  mozilla::ipc::IPCResult RecvTest(PTestDescSubsubChild* a);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 //-----------------------------------------------------------------------------
 // First descendent
 //
 class TestDescSubParent : public PTestDescSubParent {
+  friend class PTestDescSubParent;
+
  public:
   TestDescSubParent() {}
   virtual ~TestDescSubParent() {}
 
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override {}
-  virtual PTestDescSubsubParent* AllocPTestDescSubsubParent() override;
-  virtual bool DeallocPTestDescSubsubParent(
-      PTestDescSubsubParent* actor) override;
+  PTestDescSubsubParent* AllocPTestDescSubsubParent();
+  bool DeallocPTestDescSubsubParent(PTestDescSubsubParent* actor);
 };
 
 class TestDescSubChild : public PTestDescSubChild {
+  friend class PTestDescSubChild;
+
  public:
   TestDescSubChild() {}
   virtual ~TestDescSubChild() {}
 
  protected:
-  virtual PTestDescSubsubChild* AllocPTestDescSubsubChild() override;
-  virtual bool DeallocPTestDescSubsubChild(
-      PTestDescSubsubChild* actor) override;
+  PTestDescSubsubChild* AllocPTestDescSubsubChild();
+  bool DeallocPTestDescSubsubChild(PTestDescSubsubChild* actor);
 };
 
 //-----------------------------------------------------------------------------
 // Grand-descendent
 //
 class TestDescSubsubParent : public PTestDescSubsubParent {
  public:
   TestDescSubsubParent() {}
--- a/ipc/ipdl/test/cxx/TestEndpointBridgeMain.h
+++ b/ipc/ipdl/test/cxx/TestEndpointBridgeMain.h
@@ -17,103 +17,114 @@
 
 namespace mozilla {
 namespace _ipdltest {
 
 //-----------------------------------------------------------------------------
 // "Main" process
 //
 class TestEndpointBridgeMainParent : public PTestEndpointBridgeMainParent {
+  friend class PTestEndpointBridgeMainParent;
+
  public:
   TestEndpointBridgeMainParent() {}
   virtual ~TestEndpointBridgeMainParent() {}
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
  protected:
   mozilla::ipc::IPCResult RecvBridged(
-      mozilla::ipc::Endpoint<PTestEndpointBridgeMainSubParent>&& endpoint)
-      override;
+      mozilla::ipc::Endpoint<PTestEndpointBridgeMainSubParent>&& endpoint);
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 class TestEndpointBridgeMainSubParent
     : public PTestEndpointBridgeMainSubParent {
+  friend class PTestEndpointBridgeMainSubParent;
+
  public:
   explicit TestEndpointBridgeMainSubParent() {}
   virtual ~TestEndpointBridgeMainSubParent() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvHello() override;
-  virtual mozilla::ipc::IPCResult RecvHelloSync() override;
-  virtual mozilla::ipc::IPCResult AnswerHelloRpc() override;
+  mozilla::ipc::IPCResult RecvHello();
+  mozilla::ipc::IPCResult RecvHelloSync();
+  mozilla::ipc::IPCResult AnswerHelloRpc();
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 //-----------------------------------------------------------------------------
 // "Sub" process --- child of "main"
 //
 class TestEndpointBridgeSubParent;
 
 class TestEndpointBridgeMainChild : public PTestEndpointBridgeMainChild {
+  friend class PTestEndpointBridgeMainChild;
+
  public:
   TestEndpointBridgeMainChild();
   virtual ~TestEndpointBridgeMainChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
   IPDLUnitTestSubprocess* mSubprocess;
 };
 
 class TestEndpointBridgeSubParent : public PTestEndpointBridgeSubParent {
+  friend class PTestEndpointBridgeSubParent;
+
  public:
   TestEndpointBridgeSubParent() {}
   virtual ~TestEndpointBridgeSubParent() {}
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvBridgeEm() override;
+  mozilla::ipc::IPCResult RecvBridgeEm();
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 //-----------------------------------------------------------------------------
 // "Subsub" process --- child of "sub"
 //
 class TestEndpointBridgeSubChild : public PTestEndpointBridgeSubChild {
+  friend class PTestEndpointBridgeSubChild;
+
  public:
   TestEndpointBridgeSubChild();
   virtual ~TestEndpointBridgeSubChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvPing() override;
+  mozilla::ipc::IPCResult RecvPing();
 
   mozilla::ipc::IPCResult RecvBridged(
-      Endpoint<PTestEndpointBridgeMainSubChild>&& endpoint) override;
+      Endpoint<PTestEndpointBridgeMainSubChild>&& endpoint);
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 class TestEndpointBridgeMainSubChild : public PTestEndpointBridgeMainSubChild {
+  friend class PTestEndpointBridgeMainSubChild;
+
  public:
   explicit TestEndpointBridgeMainSubChild() : mGotHi(false) {}
   virtual ~TestEndpointBridgeMainSubChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvHi() override;
-  virtual mozilla::ipc::IPCResult AnswerHiRpc() override;
+  mozilla::ipc::IPCResult RecvHi();
+  mozilla::ipc::IPCResult AnswerHiRpc();
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
   bool mGotHi;
 };
 
 }  // namespace _ipdltest
 }  // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestEndpointOpens.h
+++ b/ipc/ipdl/test/cxx/TestEndpointOpens.h
@@ -14,79 +14,86 @@
 
 namespace mozilla {
 
 // parent process
 
 namespace _ipdltest {
 
 class TestEndpointOpensParent : public PTestEndpointOpensParent {
+  friend class PTestEndpointOpensParent;
+
  public:
   TestEndpointOpensParent() {}
   virtual ~TestEndpointOpensParent() {}
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStartSubprotocol(
-      mozilla::ipc::Endpoint<PTestEndpointOpensOpenedParent>&& endpoint)
-      override;
+  mozilla::ipc::IPCResult RecvStartSubprotocol(
+      mozilla::ipc::Endpoint<PTestEndpointOpensOpenedParent>&& endpoint);
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 }  // namespace _ipdltest
 
 namespace _ipdltest2 {
 
 class TestEndpointOpensOpenedParent : public PTestEndpointOpensOpenedParent {
+  friend class PTestEndpointOpensOpenedParent;
+
  public:
   explicit TestEndpointOpensOpenedParent() {}
   virtual ~TestEndpointOpensOpenedParent() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvHello() override;
-  virtual mozilla::ipc::IPCResult RecvHelloSync() override;
-  virtual mozilla::ipc::IPCResult AnswerHelloRpc() override;
+  mozilla::ipc::IPCResult RecvHello();
+  mozilla::ipc::IPCResult RecvHelloSync();
+  mozilla::ipc::IPCResult AnswerHelloRpc();
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 }  // namespace _ipdltest2
 
 // child process
 
 namespace _ipdltest {
 
 class TestEndpointOpensChild : public PTestEndpointOpensChild {
+  friend class PTestEndpointOpensChild;
+
  public:
   TestEndpointOpensChild();
   virtual ~TestEndpointOpensChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 }  // namespace _ipdltest
 
 namespace _ipdltest2 {
 
 class TestEndpointOpensOpenedChild : public PTestEndpointOpensOpenedChild {
+  friend class PTestEndpointOpensOpenedChild;
+
  public:
   explicit TestEndpointOpensOpenedChild() : mGotHi(false) {}
   virtual ~TestEndpointOpensOpenedChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvHi() override;
-  virtual mozilla::ipc::IPCResult AnswerHiRpc() override;
+  mozilla::ipc::IPCResult RecvHi();
+  mozilla::ipc::IPCResult AnswerHiRpc();
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
   bool mGotHi;
 };
 
 }  // namespace _ipdltest2
 
--- a/ipc/ipdl/test/cxx/TestFailedCtor.h
+++ b/ipc/ipdl/test/cxx/TestFailedCtor.h
@@ -14,97 +14,99 @@
 
 namespace mozilla {
 namespace _ipdltest {
 
 //-----------------------------------------------------------------------------
 // Top-level
 //
 class TestFailedCtorParent : public PTestFailedCtorParent {
+  friend class PTestFailedCtorParent;
+
  public:
   TestFailedCtorParent() {}
   virtual ~TestFailedCtorParent() {}
 
   static bool RunTestInProcesses() { return true; }
 
   // FIXME/bug 703322 Disabled because child calls exit() to end
   //                  test, not clear how to handle failed ctor in
   //                  threaded mode.
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
  protected:
-  virtual PTestFailedCtorSubParent* AllocPTestFailedCtorSubParent() override;
-  virtual bool DeallocPTestFailedCtorSubParent(
-      PTestFailedCtorSubParent* actor) override;
+  PTestFailedCtorSubParent* AllocPTestFailedCtorSubParent();
+  bool DeallocPTestFailedCtorSubParent(PTestFailedCtorSubParent* actor);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (AbnormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestFailedCtorChild : public PTestFailedCtorChild {
+  friend class PTestFailedCtorChild;
+
  public:
   TestFailedCtorChild() {}
   virtual ~TestFailedCtorChild() {}
 
  protected:
-  virtual PTestFailedCtorSubChild* AllocPTestFailedCtorSubChild() override;
+  PTestFailedCtorSubChild* AllocPTestFailedCtorSubChild();
 
-  virtual mozilla::ipc::IPCResult AnswerPTestFailedCtorSubConstructor(
+  mozilla::ipc::IPCResult AnswerPTestFailedCtorSubConstructor(
       PTestFailedCtorSubChild* actor) override;
 
-  virtual bool DeallocPTestFailedCtorSubChild(
-      PTestFailedCtorSubChild* actor) override;
+  bool DeallocPTestFailedCtorSubChild(PTestFailedCtorSubChild* actor);
 
   virtual void ProcessingError(Result aCode, const char* aReason) override;
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     fail("should have _exit()ed");
   }
 };
 
 //-----------------------------------------------------------------------------
 // First descendent
 //
 class TestFailedCtorSubsub;
 
 class TestFailedCtorSubParent : public PTestFailedCtorSubParent {
+  friend class PTestFailedCtorSubParent;
+
  public:
   TestFailedCtorSubParent() : mOne(nullptr), mTwo(nullptr), mThree(nullptr) {}
   virtual ~TestFailedCtorSubParent();
 
  protected:
-  virtual PTestFailedCtorSubsubParent* AllocPTestFailedCtorSubsubParent()
-      override;
+  PTestFailedCtorSubsubParent* AllocPTestFailedCtorSubsubParent();
 
-  virtual bool DeallocPTestFailedCtorSubsubParent(
-      PTestFailedCtorSubsubParent* actor) override;
-  virtual mozilla::ipc::IPCResult RecvSync() override { return IPC_OK(); }
+  bool DeallocPTestFailedCtorSubsubParent(PTestFailedCtorSubsubParent* actor);
+  mozilla::ipc::IPCResult RecvSync() { return IPC_OK(); }
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
   TestFailedCtorSubsub* mOne;
   TestFailedCtorSubsub* mTwo;
   TestFailedCtorSubsub* mThree;
 };
 
 class TestFailedCtorSubChild : public PTestFailedCtorSubChild {
+  friend class PTestFailedCtorSubChild;
+
  public:
   TestFailedCtorSubChild() {}
   virtual ~TestFailedCtorSubChild() {}
 
  protected:
-  virtual PTestFailedCtorSubsubChild* AllocPTestFailedCtorSubsubChild()
-      override;
-  virtual bool DeallocPTestFailedCtorSubsubChild(
-      PTestFailedCtorSubsubChild* actor) override;
+  PTestFailedCtorSubsubChild* AllocPTestFailedCtorSubsubChild();
+  bool DeallocPTestFailedCtorSubsubChild(PTestFailedCtorSubsubChild* actor);
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 //-----------------------------------------------------------------------------
 // Grand-descendent
 //
 class TestFailedCtorSubsub : public PTestFailedCtorSubsubParent,
--- a/ipc/ipdl/test/cxx/TestHangs.h
+++ b/ipc/ipdl/test/cxx/TestHangs.h
@@ -5,64 +5,68 @@
 
 #include "mozilla/_ipdltest/PTestHangsParent.h"
 #include "mozilla/_ipdltest/PTestHangsChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestHangsParent : public PTestHangsParent {
+  friend class PTestHangsParent;
+
  public:
   TestHangsParent();
   virtual ~TestHangsParent();
 
   static bool RunTestInProcesses() { return true; }
 
   // FIXME/bug 703320 Disabled because parent kills child proc, not
   //                  clear how that should work in threads.
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
  protected:
   virtual bool ShouldContinueFromReplyTimeout() override;
 
-  virtual mozilla::ipc::IPCResult RecvNonce() override { return IPC_OK(); }
+  mozilla::ipc::IPCResult RecvNonce() { return IPC_OK(); }
 
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
+  mozilla::ipc::IPCResult AnswerStackFrame();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (AbnormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 
   void CleanUp();
 
   bool mDetectedHang;
   int32_t mNumAnswerStackFrame;
 };
 
 class TestHangsChild : public PTestHangsChild {
+  friend class PTestHangsChild;
+
  public:
   TestHangsChild();
   virtual ~TestHangsChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override {
+  mozilla::ipc::IPCResult RecvStart() {
     if (!SendNonce()) fail("sending Nonce");
     return IPC_OK();
   }
 
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override {
+  mozilla::ipc::IPCResult AnswerStackFrame() {
     if (CallStackFrame()) fail("should have failed");
     return IPC_OK();
   }
 
-  virtual mozilla::ipc::IPCResult AnswerHang() override;
+  mozilla::ipc::IPCResult AnswerHang();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (AbnormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestHighestPrio.h
+++ b/ipc/ipdl/test/cxx/TestHighestPrio.h
@@ -14,20 +14,20 @@ class TestHighestPrioParent : public PTe
   TestHighestPrioParent();
   virtual ~TestHighestPrioParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
-  mozilla::ipc::IPCResult RecvMsg1() override;
-  mozilla::ipc::IPCResult RecvMsg2() override;
-  mozilla::ipc::IPCResult RecvMsg3() override;
-  mozilla::ipc::IPCResult RecvMsg4() override;
+  mozilla::ipc::IPCResult RecvMsg1();
+  mozilla::ipc::IPCResult RecvMsg2();
+  mozilla::ipc::IPCResult RecvMsg3();
+  mozilla::ipc::IPCResult RecvMsg4();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     if (msg_num_ != 4) fail("missed IPC call");
     passed("ok");
     QuitParent();
   }
 
@@ -35,18 +35,18 @@ class TestHighestPrioParent : public PTe
   int msg_num_;
 };
 
 class TestHighestPrioChild : public PTestHighestPrioChild {
  public:
   TestHighestPrioChild();
   virtual ~TestHighestPrioChild();
 
-  mozilla::ipc::IPCResult RecvStart() override;
-  mozilla::ipc::IPCResult RecvStartInner() override;
+  mozilla::ipc::IPCResult RecvStart();
+  mozilla::ipc::IPCResult RecvStartInner();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestInterruptErrorCleanup.h
+++ b/ipc/ipdl/test/cxx/TestInterruptErrorCleanup.h
@@ -27,22 +27,24 @@ class TestInterruptErrorCleanupParent
   }
 
   virtual void ProcessingError(Result aCode, const char* aReason) override;
 
   bool mGotProcessingError;
 };
 
 class TestInterruptErrorCleanupChild : public PTestInterruptErrorCleanupChild {
+  friend class PTestInterruptErrorCleanupChild;
+
  public:
   TestInterruptErrorCleanupChild();
   virtual ~TestInterruptErrorCleanupChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult AnswerError() override;
+  mozilla::ipc::IPCResult AnswerError();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     fail("should have 'crashed'!");
   }
 };
 
 }  // namespace _ipdltest
 }  // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestInterruptRaces.h
+++ b/ipc/ipdl/test/cxx/TestInterruptRaces.h
@@ -9,41 +9,42 @@
 namespace mozilla {
 namespace _ipdltest {
 
 mozilla::ipc::RacyInterruptPolicy MediateRace(
     const mozilla::ipc::MessageChannel::MessageInfo& parent,
     const mozilla::ipc::MessageChannel::MessageInfo& child);
 
 class TestInterruptRacesParent : public PTestInterruptRacesParent {
+  friend class PTestInterruptRacesParent;
+
  public:
   TestInterruptRacesParent()
       : mHasReply(false), mChildHasReply(false), mAnsweredParent(false) {}
   virtual ~TestInterruptRacesParent() {}
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStartRace() override;
+  mozilla::ipc::IPCResult RecvStartRace();
 
-  virtual mozilla::ipc::IPCResult AnswerRace(bool* hasRace) override;
+  mozilla::ipc::IPCResult AnswerRace(bool* hasRace);
 
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
+  mozilla::ipc::IPCResult AnswerStackFrame();
 
-  virtual mozilla::ipc::IPCResult AnswerStackFrame3() override;
+  mozilla::ipc::IPCResult AnswerStackFrame3();
 
-  virtual mozilla::ipc::IPCResult AnswerParent() override;
+  mozilla::ipc::IPCResult AnswerParent();
 
-  virtual mozilla::ipc::IPCResult RecvGetAnsweredParent(
-      bool* answeredParent) override;
+  mozilla::ipc::IPCResult RecvGetAnsweredParent(bool* answeredParent);
 
-  virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
+  mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
       const MessageInfo& parent, const MessageInfo& child) override {
     return MediateRace(parent, child);
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     if (!(mHasReply && mChildHasReply)) fail("both sides should have replies!");
     passed("ok");
@@ -57,34 +58,36 @@ class TestInterruptRacesParent : public 
   void Test3();
 
   bool mHasReply;
   bool mChildHasReply;
   bool mAnsweredParent;
 };
 
 class TestInterruptRacesChild : public PTestInterruptRacesChild {
+  friend class PTestInterruptRacesChild;
+
  public:
   TestInterruptRacesChild() : mHasReply(false) {}
   virtual ~TestInterruptRacesChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
-  virtual mozilla::ipc::IPCResult AnswerRace(bool* hasRace) override;
+  mozilla::ipc::IPCResult AnswerRace(bool* hasRace);
 
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
+  mozilla::ipc::IPCResult AnswerStackFrame();
 
-  virtual mozilla::ipc::IPCResult AnswerStackFrame3() override;
+  mozilla::ipc::IPCResult AnswerStackFrame3();
 
-  virtual mozilla::ipc::IPCResult RecvWakeup() override;
+  mozilla::ipc::IPCResult RecvWakeup();
 
-  virtual mozilla::ipc::IPCResult RecvWakeup3() override;
+  mozilla::ipc::IPCResult RecvWakeup3();
 
-  virtual mozilla::ipc::IPCResult AnswerChild() override;
+  mozilla::ipc::IPCResult AnswerChild();
 
   virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
       const MessageInfo& parent, const MessageInfo& child) override {
     return MediateRace(parent, child);
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
--- a/ipc/ipdl/test/cxx/TestInterruptShutdownRace.h
+++ b/ipc/ipdl/test/cxx/TestInterruptShutdownRace.h
@@ -16,37 +16,39 @@ class TestInterruptShutdownRaceParent
   virtual ~TestInterruptShutdownRaceParent();
 
   static bool RunTestInProcesses() { return true; }
   // FIXME/bug 703323 Could work if modified
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
-  virtual mozilla::ipc::IPCResult RecvStartDeath() override;
+  mozilla::ipc::IPCResult RecvStartDeath();
 
-  virtual mozilla::ipc::IPCResult RecvOrphan() override;
+  mozilla::ipc::IPCResult RecvOrphan();
 
  protected:
   void StartShuttingDown();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (AbnormalShutdown != why) fail("unexpected destruction!");
   }
 };
 
 class TestInterruptShutdownRaceChild : public PTestInterruptShutdownRaceChild {
+  friend class PTestInterruptShutdownRaceChild;
+
  public:
   TestInterruptShutdownRaceChild();
   virtual ~TestInterruptShutdownRaceChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
-  virtual mozilla::ipc::IPCResult AnswerExit() override;
+  mozilla::ipc::IPCResult AnswerExit();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     fail("should have 'crashed'!");
   }
 };
 
 }  // namespace _ipdltest
 }  // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestJSON.h
+++ b/ipc/ipdl/test/cxx/TestJSON.h
@@ -17,34 +17,35 @@ class TestHandleParent : public PTestHan
   TestHandleParent() {}
   virtual ~TestHandleParent() {}
 
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override {}
 };
 
 class TestJSONParent : public PTestJSONParent {
+  friend class PTestJSONParent;
+
  public:
   TestJSONParent() {}
   virtual ~TestJSONParent() {}
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvTest(const JSONVariant& i,
-                                           JSONVariant* o) override;
+  mozilla::ipc::IPCResult RecvTest(const JSONVariant& i, JSONVariant* o);
 
-  virtual PTestHandleParent* AllocPTestHandleParent() override {
+  PTestHandleParent* AllocPTestHandleParent() {
     return mKid = new TestHandleParent();
   }
 
-  virtual bool DeallocPTestHandleParent(PTestHandleParent* actor) override {
+  bool DeallocPTestHandleParent(PTestHandleParent* actor) {
     delete actor;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
@@ -55,28 +56,30 @@ class TestJSONParent : public PTestJSONP
 
 class TestHandleChild : public PTestHandleChild {
  public:
   TestHandleChild() {}
   virtual ~TestHandleChild() {}
 };
 
 class TestJSONChild : public PTestJSONChild {
+  friend class PTestJSONChild;
+
  public:
   TestJSONChild() {}
   virtual ~TestJSONChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
-  virtual PTestHandleChild* AllocPTestHandleChild() override {
+  PTestHandleChild* AllocPTestHandleChild() {
     return mKid = new TestHandleChild();
   }
 
-  virtual bool DeallocPTestHandleChild(PTestHandleChild* actor) override {
+  bool DeallocPTestHandleChild(PTestHandleChild* actor) {
     delete actor;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
--- a/ipc/ipdl/test/cxx/TestLatency.h
+++ b/ipc/ipdl/test/cxx/TestLatency.h
@@ -10,32 +10,34 @@
 
 #define NR_TRIALS 10000
 #define NR_SPAMS 25000
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestLatencyParent : public PTestLatencyParent {
+  friend class PTestLatencyParent;
+
  private:
   typedef mozilla::TimeStamp TimeStamp;
   typedef mozilla::TimeDuration TimeDuration;
 
  public:
   TestLatencyParent();
   virtual ~TestLatencyParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvPong() override;
-  virtual mozilla::ipc::IPCResult RecvPong5() override;
+  mozilla::ipc::IPCResult RecvPong();
+  mozilla::ipc::IPCResult RecvPong5();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
 
     passed(
         "\n"
         "  average #ping-pong/sec:        %g\n"
         "  average #ping5-pong5/sec:      %g\n"
@@ -68,30 +70,31 @@ class TestLatencyParent : public PTestLa
 
   int mPPTrialsToGo;
   int mPP5TrialsToGo;
   uint32_t mNumChildProcessedCompressedSpams;
   uint32_t mWhichPong5;
 };
 
 class TestLatencyChild : public PTestLatencyChild {
+  friend class PTestLatencyChild;
+
  public:
   TestLatencyChild();
   virtual ~TestLatencyChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvPing() override;
-  virtual mozilla::ipc::IPCResult RecvPing5() override;
-  virtual mozilla::ipc::IPCResult AnswerRpc() override;
-  virtual mozilla::ipc::IPCResult RecvSpam() override;
-  virtual mozilla::ipc::IPCResult AnswerSynchro() override;
-  virtual mozilla::ipc::IPCResult RecvCompressedSpam(
-      const uint32_t& seqno) override;
-  virtual mozilla::ipc::IPCResult AnswerSynchro2(
-      uint32_t* lastSeqno, uint32_t* numMessagesDispatched) override;
+  mozilla::ipc::IPCResult RecvPing();
+  mozilla::ipc::IPCResult RecvPing5();
+  mozilla::ipc::IPCResult AnswerRpc();
+  mozilla::ipc::IPCResult RecvSpam();
+  mozilla::ipc::IPCResult AnswerSynchro();
+  mozilla::ipc::IPCResult RecvCompressedSpam(const uint32_t& seqno);
+  mozilla::ipc::IPCResult AnswerSynchro2(uint32_t* lastSeqno,
+                                         uint32_t* numMessagesDispatched);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 
   uint32_t mLastSeqno;
   uint32_t mNumProcessedCompressedSpams;
--- a/ipc/ipdl/test/cxx/TestManyChildAllocs.h
+++ b/ipc/ipdl/test/cxx/TestManyChildAllocs.h
@@ -10,67 +10,69 @@
 #include "mozilla/_ipdltest/PTestManyChildAllocsSubChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 // top-level protocol
 
 class TestManyChildAllocsParent : public PTestManyChildAllocsParent {
+  friend class PTestManyChildAllocsParent;
+
  public:
   TestManyChildAllocsParent();
   virtual ~TestManyChildAllocsParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvDone() override;
-  virtual bool DeallocPTestManyChildAllocsSubParent(
-      PTestManyChildAllocsSubParent* __a) override;
-  virtual PTestManyChildAllocsSubParent* AllocPTestManyChildAllocsSubParent()
-      override;
+  mozilla::ipc::IPCResult RecvDone();
+  bool DeallocPTestManyChildAllocsSubParent(PTestManyChildAllocsSubParent* __a);
+  PTestManyChildAllocsSubParent* AllocPTestManyChildAllocsSubParent();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestManyChildAllocsChild : public PTestManyChildAllocsChild {
+  friend class PTestManyChildAllocsChild;
+
  public:
   TestManyChildAllocsChild();
   virtual ~TestManyChildAllocsChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvGo() override;
-  virtual bool DeallocPTestManyChildAllocsSubChild(
-      PTestManyChildAllocsSubChild* __a) override;
-  virtual PTestManyChildAllocsSubChild* AllocPTestManyChildAllocsSubChild()
-      override;
+  mozilla::ipc::IPCResult RecvGo();
+  bool DeallocPTestManyChildAllocsSubChild(PTestManyChildAllocsSubChild* __a);
+  PTestManyChildAllocsSubChild* AllocPTestManyChildAllocsSubChild();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 // do-nothing sub-protocol actors
 
 class TestManyChildAllocsSubParent : public PTestManyChildAllocsSubParent {
+  friend class PTestManyChildAllocsSubParent;
+
  public:
   TestManyChildAllocsSubParent() {}
   virtual ~TestManyChildAllocsSubParent() {}
 
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override {}
-  virtual mozilla::ipc::IPCResult RecvHello() override { return IPC_OK(); }
+  mozilla::ipc::IPCResult RecvHello() { return IPC_OK(); }
 };
 
 class TestManyChildAllocsSubChild : public PTestManyChildAllocsSubChild {
  public:
   TestManyChildAllocsSubChild() {}
   virtual ~TestManyChildAllocsSubChild() {}
 };
 
--- a/ipc/ipdl/test/cxx/TestMultiMgrs.h
+++ b/ipc/ipdl/test/cxx/TestMultiMgrs.h
@@ -24,92 +24,92 @@ class TestMultiMgrsBottomParent : public
   TestMultiMgrsBottomParent() {}
   virtual ~TestMultiMgrsBottomParent() {}
 
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override {}
 };
 
 class TestMultiMgrsLeftParent : public PTestMultiMgrsLeftParent {
+  friend class PTestMultiMgrsLeftParent;
+
  public:
   TestMultiMgrsLeftParent() {}
   virtual ~TestMultiMgrsLeftParent() {}
 
   bool HasChild(TestMultiMgrsBottomParent* c) {
     return ManagedPTestMultiMgrsBottomParent().Contains(c);
   }
 
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override {}
 
-  virtual PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottomParent()
-      override {
+  PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottomParent() {
     return new TestMultiMgrsBottomParent();
   }
 
-  virtual bool DeallocPTestMultiMgrsBottomParent(
-      PTestMultiMgrsBottomParent* actor) override {
+  bool DeallocPTestMultiMgrsBottomParent(PTestMultiMgrsBottomParent* actor) {
     delete actor;
     return true;
   }
 };
 
 class TestMultiMgrsRightParent : public PTestMultiMgrsRightParent {
+  friend class PTestMultiMgrsRightParent;
+
  public:
   TestMultiMgrsRightParent() {}
   virtual ~TestMultiMgrsRightParent() {}
 
   bool HasChild(TestMultiMgrsBottomParent* c) {
     return ManagedPTestMultiMgrsBottomParent().Contains(c);
   }
 
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override {}
 
-  virtual PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottomParent()
-      override {
+  PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottomParent() {
     return new TestMultiMgrsBottomParent();
   }
 
-  virtual bool DeallocPTestMultiMgrsBottomParent(
-      PTestMultiMgrsBottomParent* actor) override {
+  bool DeallocPTestMultiMgrsBottomParent(PTestMultiMgrsBottomParent* actor) {
     delete actor;
     return true;
   }
 };
 
 class TestMultiMgrsParent : public PTestMultiMgrsParent {
+  friend class PTestMultiMgrsParent;
+
  public:
   TestMultiMgrsParent() {}
   virtual ~TestMultiMgrsParent() {}
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvOK() override;
+  mozilla::ipc::IPCResult RecvOK();
 
-  virtual PTestMultiMgrsLeftParent* AllocPTestMultiMgrsLeftParent() override {
+  PTestMultiMgrsLeftParent* AllocPTestMultiMgrsLeftParent() {
     return new TestMultiMgrsLeftParent();
   }
 
-  virtual bool DeallocPTestMultiMgrsLeftParent(
-      PTestMultiMgrsLeftParent* actor) override {
+  bool DeallocPTestMultiMgrsLeftParent(PTestMultiMgrsLeftParent* actor) {
     delete actor;
     return true;
   }
 
-  virtual PTestMultiMgrsRightParent* AllocPTestMultiMgrsRightParent() override {
+  PTestMultiMgrsRightParent* AllocPTestMultiMgrsRightParent() {
     return new TestMultiMgrsRightParent();
   }
 
-  virtual bool DeallocPTestMultiMgrsRightParent(
-      PTestMultiMgrsRightParent* actor) override {
+  bool DeallocPTestMultiMgrsRightParent(PTestMultiMgrsRightParent* actor) {
     delete actor;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
@@ -122,92 +122,94 @@ class TestMultiMgrsParent : public PTest
 
 class TestMultiMgrsBottomChild : public PTestMultiMgrsBottomChild {
  public:
   TestMultiMgrsBottomChild() {}
   virtual ~TestMultiMgrsBottomChild() {}
 };
 
 class TestMultiMgrsLeftChild : public PTestMultiMgrsLeftChild {
+  friend class PTestMultiMgrsLeftChild;
+
  public:
   TestMultiMgrsLeftChild() {}
   virtual ~TestMultiMgrsLeftChild() {}
 
   bool HasChild(PTestMultiMgrsBottomChild* c) {
     return ManagedPTestMultiMgrsBottomChild().Contains(c);
   }
 
  protected:
   virtual mozilla::ipc::IPCResult RecvPTestMultiMgrsBottomConstructor(
       PTestMultiMgrsBottomChild* actor) override;
 
-  virtual PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottomChild() override {
+  PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottomChild() {
     return new TestMultiMgrsBottomChild();
   }
 
-  virtual bool DeallocPTestMultiMgrsBottomChild(
-      PTestMultiMgrsBottomChild* actor) override {
+  bool DeallocPTestMultiMgrsBottomChild(PTestMultiMgrsBottomChild* actor) {
     delete actor;
     return true;
   }
 };
 
 class TestMultiMgrsRightChild : public PTestMultiMgrsRightChild {
+  friend class PTestMultiMgrsRightChild;
+
  public:
   TestMultiMgrsRightChild() {}
   virtual ~TestMultiMgrsRightChild() {}
 
   bool HasChild(PTestMultiMgrsBottomChild* c) {
     return ManagedPTestMultiMgrsBottomChild().Contains(c);
   }
 
  protected:
   virtual mozilla::ipc::IPCResult RecvPTestMultiMgrsBottomConstructor(
       PTestMultiMgrsBottomChild* actor) override;
 
-  virtual PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottomChild() override {
+  PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottomChild() {
     return new TestMultiMgrsBottomChild();
   }
 
-  virtual bool DeallocPTestMultiMgrsBottomChild(
-      PTestMultiMgrsBottomChild* actor) override {
+  bool DeallocPTestMultiMgrsBottomChild(PTestMultiMgrsBottomChild* actor) {
     delete actor;
     return true;
   }
 };
 
 class TestMultiMgrsChild : public PTestMultiMgrsChild {
+  friend class PTestMultiMgrsChild;
+
  public:
   TestMultiMgrsChild() {}
   virtual ~TestMultiMgrsChild() {}
 
   void Main();
 
   PTestMultiMgrsBottomChild* mBottomL;
   PTestMultiMgrsBottomChild* mBottomR;
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvCheck() override;
+  mozilla::ipc::IPCResult RecvCheck();
 
-  virtual PTestMultiMgrsLeftChild* AllocPTestMultiMgrsLeftChild() override {
+  PTestMultiMgrsLeftChild* AllocPTestMultiMgrsLeftChild() {
     return new TestMultiMgrsLeftChild();
   }
 
-  virtual bool DeallocPTestMultiMgrsLeftChild(
-      PTestMultiMgrsLeftChild* actor) override {
+  bool DeallocPTestMultiMgrsLeftChild(PTestMultiMgrsLeftChild* actor) {
     delete actor;
     return true;
   }
 
-  virtual PTestMultiMgrsRightChild* AllocPTestMultiMgrsRightChild() override {
+  PTestMultiMgrsRightChild* AllocPTestMultiMgrsRightChild() {
     return new TestMultiMgrsRightChild();
   }
 
-  virtual bool DeallocPTestMultiMgrsRightChild(
-      PTestMultiMgrsRightChild* actor) override {
+  bool DeallocPTestMultiMgrsRightChild(PTestMultiMgrsRightChild* actor) {
     delete actor;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitChild();
--- a/ipc/ipdl/test/cxx/TestNestedLoops.h
+++ b/ipc/ipdl/test/cxx/TestNestedLoops.h
@@ -5,48 +5,52 @@
 
 #include "mozilla/_ipdltest/PTestNestedLoopsParent.h"
 #include "mozilla/_ipdltest/PTestNestedLoopsChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestNestedLoopsParent : public PTestNestedLoopsParent {
+  friend class PTestNestedLoopsParent;
+
  public:
   TestNestedLoopsParent();
   virtual ~TestNestedLoopsParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvNonce() override;
+  mozilla::ipc::IPCResult RecvNonce();
 
   void BreakNestedLoop();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 
   bool mBreakNestedLoop;
 };
 
 class TestNestedLoopsChild : public PTestNestedLoopsChild {
+  friend class PTestNestedLoopsChild;
+
  public:
   TestNestedLoopsChild();
   virtual ~TestNestedLoopsChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
-  virtual mozilla::ipc::IPCResult AnswerR() override;
+  mozilla::ipc::IPCResult AnswerR();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestOffMainThreadPainting.h
+++ b/ipc/ipdl/test/cxx/TestOffMainThreadPainting.h
@@ -21,20 +21,20 @@ class TestOffMainThreadPaintingParent fi
   static bool RunTestInThreads() { return false; }
   static bool RunTestInProcesses() { return true; }
 
   void Main();
 
   MOZ_IMPLICIT TestOffMainThreadPaintingParent();
   ~TestOffMainThreadPaintingParent() override;
 
-  ipc::IPCResult RecvFinishedLayout(const uint64_t& aTxnId) override;
-  ipc::IPCResult RecvAsyncMessage(const uint64_t& aTxnId) override;
-  ipc::IPCResult RecvSyncMessage(const uint64_t& aTxnId) override;
-  ipc::IPCResult RecvEndTest() override;
+  ipc::IPCResult RecvFinishedLayout(const uint64_t& aTxnId);
+  ipc::IPCResult RecvAsyncMessage(const uint64_t& aTxnId);
+  ipc::IPCResult RecvSyncMessage(const uint64_t& aTxnId);
+  ipc::IPCResult RecvEndTest();
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
   void NotifyFinishedPaint(const uint64_t& aTxnId);
 
  private:
   RefPtr<TestPaintThreadParent> mPaintActor;
   Maybe<uint64_t> mCompletedTxn;
   Maybe<uint64_t> mPaintedTxn;
@@ -44,17 +44,17 @@ class TestOffMainThreadPaintingParent fi
 
 // Analagous to LayerTransactionChild.
 class TestOffMainThreadPaintingChild final : public PTestLayoutThreadChild {
  public:
   TestOffMainThreadPaintingChild();
   ~TestOffMainThreadPaintingChild() override;
 
   ipc::IPCResult RecvStartTest(
-      ipc::Endpoint<PTestPaintThreadChild>&& aEndpoint) override;
+      ipc::Endpoint<PTestPaintThreadChild>&& aEndpoint);
   void ActorDestroy(ActorDestroyReason aWhy) override;
   void ProcessingError(Result aCode, const char* aReason) override;
 
  private:
   void IssueTransaction();
 
  private:
   UniquePtr<base::Thread> mPaintThread;
@@ -68,17 +68,17 @@ class TestOffMainThreadPaintingChild fin
 
 class TestPaintThreadParent final : public PTestPaintThreadParent {
  public:
   explicit TestPaintThreadParent(TestOffMainThreadPaintingParent* aMainBridge);
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(TestPaintThreadParent);
 
   bool Bind(ipc::Endpoint<PTestPaintThreadParent>&& aEndpoint);
-  ipc::IPCResult RecvFinishedPaint(const uint64_t& aTxnId) override;
+  ipc::IPCResult RecvFinishedPaint(const uint64_t& aTxnId);
   void ActorDestroy(ActorDestroyReason aWhy) override;
   void DeallocPTestPaintThreadParent() override;
 
  private:
   ~TestPaintThreadParent() override;
 
  private:
   TestOffMainThreadPaintingParent* mMainBridge;
--- a/ipc/ipdl/test/cxx/TestRPC.h
+++ b/ipc/ipdl/test/cxx/TestRPC.h
@@ -14,20 +14,20 @@ class TestRPCParent : public PTestRPCPar
   TestRPCParent();
   virtual ~TestRPCParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
-  mozilla::ipc::IPCResult RecvTest1_Start(uint32_t* aResult) override;
-  mozilla::ipc::IPCResult RecvTest1_InnerEvent(uint32_t* aResult) override;
-  mozilla::ipc::IPCResult RecvTest2_Start() override;
-  mozilla::ipc::IPCResult RecvTest2_OutOfOrder() override;
+  mozilla::ipc::IPCResult RecvTest1_Start(uint32_t* aResult);
+  mozilla::ipc::IPCResult RecvTest1_InnerEvent(uint32_t* aResult);
+  mozilla::ipc::IPCResult RecvTest2_Start();
+  mozilla::ipc::IPCResult RecvTest2_OutOfOrder();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     if (!reentered_) fail("never processed raced RPC call!");
     if (!resolved_first_cpow_) fail("never resolved first CPOW!");
     passed("ok");
     QuitParent();
   }
@@ -37,21 +37,21 @@ class TestRPCParent : public PTestRPCPar
   bool resolved_first_cpow_;
 };
 
 class TestRPCChild : public PTestRPCChild {
  public:
   TestRPCChild();
   virtual ~TestRPCChild();
 
-  mozilla::ipc::IPCResult RecvStart() override;
-  mozilla::ipc::IPCResult RecvTest1_InnerQuery(uint32_t* aResult) override;
-  mozilla::ipc::IPCResult RecvTest1_NoReenter(uint32_t* aResult) override;
-  mozilla::ipc::IPCResult RecvTest2_FirstUrgent() override;
-  mozilla::ipc::IPCResult RecvTest2_SecondUrgent() override;
+  mozilla::ipc::IPCResult RecvStart();
+  mozilla::ipc::IPCResult RecvTest1_InnerQuery(uint32_t* aResult);
+  mozilla::ipc::IPCResult RecvTest1_NoReenter(uint32_t* aResult);
+  mozilla::ipc::IPCResult RecvTest2_FirstUrgent();
+  mozilla::ipc::IPCResult RecvTest2_SecondUrgent();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestRaceDeadlock.h
+++ b/ipc/ipdl/test/cxx/TestRaceDeadlock.h
@@ -5,54 +5,58 @@
 
 #include "mozilla/_ipdltest/PTestRaceDeadlockParent.h"
 #include "mozilla/_ipdltest/PTestRaceDeadlockChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestRaceDeadlockParent : public PTestRaceDeadlockParent {
+  friend class PTestRaceDeadlockParent;
+
  public:
   TestRaceDeadlockParent();
   virtual ~TestRaceDeadlockParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
   virtual bool ShouldContinueFromReplyTimeout() override;
 
   void Test1();
 
-  virtual mozilla::ipc::IPCResult RecvStartRace() override;
-  virtual mozilla::ipc::IPCResult AnswerLose() override;
+  mozilla::ipc::IPCResult RecvStartRace();
+  mozilla::ipc::IPCResult AnswerLose();
 
   virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
       const MessageInfo& parent, const MessageInfo& child) override;
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestRaceDeadlockChild : public PTestRaceDeadlockChild {
+  friend class PTestRaceDeadlockChild;
+
  public:
   TestRaceDeadlockChild();
   virtual ~TestRaceDeadlockChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStartRace() override;
+  mozilla::ipc::IPCResult RecvStartRace();
 
-  virtual mozilla::ipc::IPCResult AnswerWin() override;
+  mozilla::ipc::IPCResult AnswerWin();
 
-  virtual mozilla::ipc::IPCResult AnswerRpc() override;
+  mozilla::ipc::IPCResult AnswerRpc();
 
   virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
       const MessageInfo& parent, const MessageInfo& child) override;
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
--- a/ipc/ipdl/test/cxx/TestRaceDeferral.h
+++ b/ipc/ipdl/test/cxx/TestRaceDeferral.h
@@ -5,53 +5,57 @@
 
 #include "mozilla/_ipdltest/PTestRaceDeferralParent.h"
 #include "mozilla/_ipdltest/PTestRaceDeferralChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestRaceDeferralParent : public PTestRaceDeferralParent {
+  friend class PTestRaceDeferralParent;
+
  public:
   TestRaceDeferralParent();
   virtual ~TestRaceDeferralParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
   void Test1();
 
-  virtual mozilla::ipc::IPCResult AnswerLose() override;
+  mozilla::ipc::IPCResult AnswerLose();
 
   virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
       const MessageInfo& parent, const MessageInfo& child) override;
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 
   bool mProcessedLose;
 };
 
 class TestRaceDeferralChild : public PTestRaceDeferralChild {
+  friend class PTestRaceDeferralChild;
+
  public:
   TestRaceDeferralChild();
   virtual ~TestRaceDeferralChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStartRace() override;
+  mozilla::ipc::IPCResult RecvStartRace();
 
-  virtual mozilla::ipc::IPCResult AnswerWin() override;
+  mozilla::ipc::IPCResult AnswerWin();
 
-  virtual mozilla::ipc::IPCResult AnswerRpc() override;
+  mozilla::ipc::IPCResult AnswerRpc();
 
   virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
       const MessageInfo& parent, const MessageInfo& child) override;
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
--- a/ipc/ipdl/test/cxx/TestRacyInterruptReplies.h
+++ b/ipc/ipdl/test/cxx/TestRacyInterruptReplies.h
@@ -5,51 +5,55 @@
 
 #include "mozilla/_ipdltest/PTestRacyInterruptRepliesParent.h"
 #include "mozilla/_ipdltest/PTestRacyInterruptRepliesChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestRacyInterruptRepliesParent : public PTestRacyInterruptRepliesParent {
+  friend class PTestRacyInterruptRepliesParent;
+
  public:
   TestRacyInterruptRepliesParent();
   virtual ~TestRacyInterruptRepliesParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvA_() override;
+  mozilla::ipc::IPCResult RecvA_();
 
-  virtual mozilla::ipc::IPCResult Answer_R(int* replyNum) override;
+  mozilla::ipc::IPCResult Answer_R(int* replyNum);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 
  private:
   int mReplyNum;
 };
 
 class TestRacyInterruptRepliesChild : public PTestRacyInterruptRepliesChild {
+  friend class PTestRacyInterruptRepliesChild;
+
  public:
   TestRacyInterruptRepliesChild();
   virtual ~TestRacyInterruptRepliesChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult AnswerR_(int* replyNum) override;
+  mozilla::ipc::IPCResult AnswerR_(int* replyNum);
 
-  virtual mozilla::ipc::IPCResult RecvChildTest() override;
+  mozilla::ipc::IPCResult RecvChildTest();
 
-  virtual mozilla::ipc::IPCResult Recv_A() override;
+  mozilla::ipc::IPCResult Recv_A();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 
  private:
   int mReplyNum;
--- a/ipc/ipdl/test/cxx/TestRacyReentry.h
+++ b/ipc/ipdl/test/cxx/TestRacyReentry.h
@@ -5,48 +5,52 @@
 
 #include "mozilla/_ipdltest/PTestRacyReentryParent.h"
 #include "mozilla/_ipdltest/PTestRacyReentryChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestRacyReentryParent : public PTestRacyReentryParent {
+  friend class PTestRacyReentryParent;
+
  public:
   TestRacyReentryParent();
   virtual ~TestRacyReentryParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult AnswerE() override;
+  mozilla::ipc::IPCResult AnswerE();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 
   bool mRecvdE;
 };
 
 class TestRacyReentryChild : public PTestRacyReentryChild {
+  friend class PTestRacyReentryChild;
+
  public:
   TestRacyReentryChild();
   virtual ~TestRacyReentryChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
-  virtual mozilla::ipc::IPCResult RecvN() override;
+  mozilla::ipc::IPCResult RecvN();
 
-  virtual mozilla::ipc::IPCResult AnswerH() override;
+  mozilla::ipc::IPCResult AnswerH();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestRacyUndefer.h
+++ b/ipc/ipdl/test/cxx/TestRacyUndefer.h
@@ -5,51 +5,55 @@
 
 #include "mozilla/_ipdltest/PTestRacyUndeferParent.h"
 #include "mozilla/_ipdltest/PTestRacyUndeferChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestRacyUndeferParent : public PTestRacyUndeferParent {
+  friend class PTestRacyUndeferParent;
+
  public:
   TestRacyUndeferParent();
   virtual ~TestRacyUndeferParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult AnswerSpam() override;
+  mozilla::ipc::IPCResult AnswerSpam();
 
-  virtual mozilla::ipc::IPCResult AnswerRaceWinTwice() override;
+  mozilla::ipc::IPCResult AnswerRaceWinTwice();
 
-  virtual mozilla::ipc::IPCResult RecvDone() override;
+  mozilla::ipc::IPCResult RecvDone();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestRacyUndeferChild : public PTestRacyUndeferChild {
+  friend class PTestRacyUndeferChild;
+
  public:
   TestRacyUndeferChild();
   virtual ~TestRacyUndeferChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
-  virtual mozilla::ipc::IPCResult RecvAwakenSpam() override;
-  virtual mozilla::ipc::IPCResult RecvAwakenRaceWinTwice() override;
+  mozilla::ipc::IPCResult RecvAwakenSpam();
+  mozilla::ipc::IPCResult RecvAwakenRaceWinTwice();
 
-  virtual mozilla::ipc::IPCResult AnswerRace() override;
+  mozilla::ipc::IPCResult AnswerRace();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestSanity.h
+++ b/ipc/ipdl/test/cxx/TestSanity.h
@@ -5,46 +5,48 @@
 
 #include "mozilla/_ipdltest/PTestSanityParent.h"
 #include "mozilla/_ipdltest/PTestSanityChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestSanityParent : public PTestSanityParent {
+  friend class PTestSanityParent;
+
  public:
   TestSanityParent();
   virtual ~TestSanityParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvPong(const int& one,
-                                           const float& zeroPtTwoFive,
-                                           const uint8_t& dummy) override;
+  mozilla::ipc::IPCResult RecvPong(const int& one, const float& zeroPtTwoFive,
+                                   const uint8_t& dummy);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestSanityChild : public PTestSanityChild {
+  friend class PTestSanityChild;
+
  public:
   TestSanityChild();
   virtual ~TestSanityChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvPing(const int& zero,
-                                           const float& zeroPtFive,
-                                           const int8_t& dummy) override;
+  mozilla::ipc::IPCResult RecvPing(const int& zero, const float& zeroPtFive,
+                                   const int8_t& dummy);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestSelfManageRoot.h
+++ b/ipc/ipdl/test/cxx/TestSelfManageRoot.h
@@ -10,98 +10,102 @@
 
 namespace mozilla {
 namespace _ipdltest {
 
 //-----------------------------------------------------------------------------
 // Parent side
 
 class TestSelfManageParent : public PTestSelfManageParent {
+  friend class PTestSelfManageParent;
+
  public:
   TestSelfManageParent() { MOZ_COUNT_CTOR(TestSelfManageParent); }
   virtual ~TestSelfManageParent() { MOZ_COUNT_DTOR(TestSelfManageParent); }
 
   ActorDestroyReason mWhy;
 
  protected:
-  virtual PTestSelfManageParent* AllocPTestSelfManageParent() override {
+  PTestSelfManageParent* AllocPTestSelfManageParent() {
     return new TestSelfManageParent();
   }
 
-  virtual bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) override {
-    return true;
-  }
+  bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) { return true; }
 
   virtual void ActorDestroy(ActorDestroyReason why) override { mWhy = why; }
 };
 
 class TestSelfManageRootParent : public PTestSelfManageRootParent {
+  friend class PTestSelfManageRootParent;
+
  public:
   TestSelfManageRootParent() { MOZ_COUNT_CTOR(TestSelfManageRootParent); }
   virtual ~TestSelfManageRootParent() {
     MOZ_COUNT_DTOR(TestSelfManageRootParent);
   }
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual PTestSelfManageParent* AllocPTestSelfManageParent() override {
+  PTestSelfManageParent* AllocPTestSelfManageParent() {
     return new TestSelfManageParent();
   }
 
-  virtual bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) override {
-    return true;
-  }
+  bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) { return true; }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 //-----------------------------------------------------------------------------
 // Child side
 
 class TestSelfManageChild : public PTestSelfManageChild {
+  friend class PTestSelfManageChild;
+
  public:
   TestSelfManageChild() { MOZ_COUNT_CTOR(TestSelfManageChild); }
   virtual ~TestSelfManageChild() { MOZ_COUNT_DTOR(TestSelfManageChild); }
 
  protected:
-  virtual PTestSelfManageChild* AllocPTestSelfManageChild() override {
+  PTestSelfManageChild* AllocPTestSelfManageChild() {
     return new TestSelfManageChild();
   }
 
-  virtual bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) override {
+  bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) {
     delete a;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {}
 };
 
 class TestSelfManageRootChild : public PTestSelfManageRootChild {
+  friend class PTestSelfManageRootChild;
+
  public:
   TestSelfManageRootChild() { MOZ_COUNT_CTOR(TestSelfManageRootChild); }
   virtual ~TestSelfManageRootChild() {
     MOZ_COUNT_DTOR(TestSelfManageRootChild);
   }
 
   void Main();
 
  protected:
-  virtual PTestSelfManageChild* AllocPTestSelfManageChild() override {
+  PTestSelfManageChild* AllocPTestSelfManageChild() {
     return new TestSelfManageChild();
   }
 
-  virtual bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) override {
+  bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) {
     delete a;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
--- a/ipc/ipdl/test/cxx/TestShmem.h
+++ b/ipc/ipdl/test/cxx/TestShmem.h
@@ -5,44 +5,48 @@
 
 #include "mozilla/_ipdltest/PTestShmemParent.h"
 #include "mozilla/_ipdltest/PTestShmemChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestShmemParent : public PTestShmemParent {
+  friend class PTestShmemParent;
+
  public:
   TestShmemParent() {}
   virtual ~TestShmemParent() {}
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvTake(Shmem&& mem, Shmem&& unsafe,
-                                           const size_t& expectedSize) override;
+  mozilla::ipc::IPCResult RecvTake(Shmem&& mem, Shmem&& unsafe,
+                                   const size_t& expectedSize);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestShmemChild : public PTestShmemChild {
+  friend class PTestShmemChild;
+
  public:
   TestShmemChild() {}
   virtual ~TestShmemChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvGive(Shmem&& mem, Shmem&& unsafe,
-                                           const size_t& expectedSize) override;
+  mozilla::ipc::IPCResult RecvGive(Shmem&& mem, Shmem&& unsafe,
+                                   const size_t& expectedSize);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestShutdown.h
+++ b/ipc/ipdl/test/cxx/TestShutdown.h
@@ -28,72 +28,73 @@ class TestShutdownSubsubParent : public 
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
  private:
   bool mExpectParentDeleted;
 };
 
 class TestShutdownSubParent : public PTestShutdownSubParent {
+  friend class PTestShutdownSubParent;
+
  public:
   explicit TestShutdownSubParent(bool expectCrash)
       : mExpectCrash(expectCrash), mDeletedCount(0) {}
 
   virtual ~TestShutdownSubParent() {
     if (2 != mDeletedCount) fail("managees outliving manager!");
   }
 
  protected:
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override {
+  mozilla::ipc::IPCResult AnswerStackFrame() {
     if (!CallStackFrame()) {
       return IPC_FAIL_NO_REASON(this);
     }
     return IPC_OK();
   }
 
-  virtual PTestShutdownSubsubParent* AllocPTestShutdownSubsubParent(
-      const bool& expectParentDelete) override {
+  PTestShutdownSubsubParent* AllocPTestShutdownSubsubParent(
+      const bool& expectParentDelete) {
     return new TestShutdownSubsubParent(expectParentDelete);
   }
 
-  virtual bool DeallocPTestShutdownSubsubParent(
-      PTestShutdownSubsubParent* actor) override {
+  bool DeallocPTestShutdownSubsubParent(PTestShutdownSubsubParent* actor) {
     delete actor;
     ++mDeletedCount;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
  private:
   bool mExpectCrash;
   int mDeletedCount;
 };
 
 class TestShutdownParent : public PTestShutdownParent {
+  friend class PTestShutdownParent;
+
  public:
   TestShutdownParent() {}
   virtual ~TestShutdownParent() {}
 
   static bool RunTestInProcesses() { return true; }
   // FIXME/bug 703323 Could work if modified
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvSync() override { return IPC_OK(); }
+  mozilla::ipc::IPCResult RecvSync() { return IPC_OK(); }
 
-  virtual PTestShutdownSubParent* AllocPTestShutdownSubParent(
-      const bool& expectCrash) override {
+  PTestShutdownSubParent* AllocPTestShutdownSubParent(const bool& expectCrash) {
     return new TestShutdownSubParent(expectCrash);
   }
 
-  virtual bool DeallocPTestShutdownSubParent(
-      PTestShutdownSubParent* actor) override {
+  bool DeallocPTestShutdownSubParent(PTestShutdownSubParent* actor) {
     delete actor;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 //-----------------------------------------------------------------------------
@@ -108,56 +109,57 @@ class TestShutdownSubsubChild : public P
  protected:
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
  private:
   bool mExpectParentDeleted;
 };
 
 class TestShutdownSubChild : public PTestShutdownSubChild {
+  friend class PTestShutdownSubChild;
+
  public:
   explicit TestShutdownSubChild(bool expectCrash) : mExpectCrash(expectCrash) {}
 
   virtual ~TestShutdownSubChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
+  mozilla::ipc::IPCResult AnswerStackFrame();
 
-  virtual PTestShutdownSubsubChild* AllocPTestShutdownSubsubChild(
-      const bool& expectParentDelete) override {
+  PTestShutdownSubsubChild* AllocPTestShutdownSubsubChild(
+      const bool& expectParentDelete) {
     return new TestShutdownSubsubChild(expectParentDelete);
   }
 
-  virtual bool DeallocPTestShutdownSubsubChild(
-      PTestShutdownSubsubChild* actor) override {
+  bool DeallocPTestShutdownSubsubChild(PTestShutdownSubsubChild* actor) {
     delete actor;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 
  private:
   bool mExpectCrash;
 };
 
 class TestShutdownChild : public PTestShutdownChild {
+  friend class PTestShutdownChild;
+
  public:
   TestShutdownChild() {}
   virtual ~TestShutdownChild() {}
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
-  virtual PTestShutdownSubChild* AllocPTestShutdownSubChild(
-      const bool& expectCrash) override {
+  PTestShutdownSubChild* AllocPTestShutdownSubChild(const bool& expectCrash) {
     return new TestShutdownSubChild(expectCrash);
   }
 
-  virtual bool DeallocPTestShutdownSubChild(
-      PTestShutdownSubChild* actor) override {
+  bool DeallocPTestShutdownSubChild(PTestShutdownSubChild* actor) {
     delete actor;
     return true;
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override;
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestStackHooks.h
+++ b/ipc/ipdl/test/cxx/TestStackHooks.h
@@ -5,42 +5,44 @@
 
 #include "mozilla/_ipdltest/PTestStackHooksParent.h"
 #include "mozilla/_ipdltest/PTestStackHooksChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestStackHooksParent : public PTestStackHooksParent {
+  friend class PTestStackHooksParent;
+
  public:
   TestStackHooksParent();
   virtual ~TestStackHooksParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvAsync() override {
+  mozilla::ipc::IPCResult RecvAsync() {
     if (!mOnStack) fail("not on C++ stack?!");
     return IPC_OK();
   }
 
-  virtual mozilla::ipc::IPCResult RecvSync() override {
+  mozilla::ipc::IPCResult RecvSync() {
     if (!mOnStack) fail("not on C++ stack?!");
     return IPC_OK();
   }
 
-  virtual mozilla::ipc::IPCResult AnswerRpc() override {
+  mozilla::ipc::IPCResult AnswerRpc() {
     if (!mOnStack) fail("not on C++ stack?!");
     return IPC_OK();
   }
 
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
+  mozilla::ipc::IPCResult AnswerStackFrame();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 
   virtual void EnteredCxxStack() override { mOnStack = true; }
@@ -50,26 +52,28 @@ class TestStackHooksParent : public PTes
   virtual void ExitedCall() override { --mIncallDepth; }
 
  private:
   bool mOnStack;
   int mIncallDepth;
 };
 
 class TestStackHooksChild : public PTestStackHooksChild {
+  friend class PTestStackHooksChild;
+
  public:
   TestStackHooksChild();
   virtual ~TestStackHooksChild();
 
   void RunTests();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
+  mozilla::ipc::IPCResult AnswerStackFrame();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
 
     if (mEntered != mExited) fail("unbalanced enter/exit notifications");
 
     if (mOnStack)
       fail("computing mOnStack went awry; should have failed above assertion");
--- a/ipc/ipdl/test/cxx/TestSyncError.h
+++ b/ipc/ipdl/test/cxx/TestSyncError.h
@@ -5,46 +5,50 @@
 
 #include "mozilla/_ipdltest/PTestSyncErrorParent.h"
 #include "mozilla/_ipdltest/PTestSyncErrorChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestSyncErrorParent : public PTestSyncErrorParent {
+  friend class PTestSyncErrorParent;
+
  public:
   TestSyncErrorParent();
   virtual ~TestSyncErrorParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvError() override;
+  mozilla::ipc::IPCResult RecvError();
 
   virtual void ProcessingError(Result aCode, const char* aReason) override {
     // Ignore errors
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestSyncErrorChild : public PTestSyncErrorChild {
+  friend class PTestSyncErrorChild;
+
  public:
   TestSyncErrorChild();
   virtual ~TestSyncErrorChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
   virtual void ProcessingError(Result aCode, const char* aReason) override {
     // Ignore errors
   }
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
--- a/ipc/ipdl/test/cxx/TestSyncHang.h
+++ b/ipc/ipdl/test/cxx/TestSyncHang.h
@@ -24,22 +24,24 @@ class TestSyncHangParent : public PTestS
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestSyncHangChild : public PTestSyncHangChild {
+  friend class PTestSyncHangChild;
+
  public:
   TestSyncHangChild();
   virtual ~TestSyncHangChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvUnusedMessage() override;
+  mozilla::ipc::IPCResult RecvUnusedMessage();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestSyncWakeup.h
+++ b/ipc/ipdl/test/cxx/TestSyncWakeup.h
@@ -5,52 +5,56 @@
 
 #include "mozilla/_ipdltest/PTestSyncWakeupParent.h"
 #include "mozilla/_ipdltest/PTestSyncWakeupChild.h"
 
 namespace mozilla {
 namespace _ipdltest {
 
 class TestSyncWakeupParent : public PTestSyncWakeupParent {
+  friend class PTestSyncWakeupParent;
+
  public:
   TestSyncWakeupParent();
   virtual ~TestSyncWakeupParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return true; }
 
   void Main();
 
  protected:
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
+  mozilla::ipc::IPCResult AnswerStackFrame();
 
-  virtual mozilla::ipc::IPCResult RecvSync1() override;
+  mozilla::ipc::IPCResult RecvSync1();
 
-  virtual mozilla::ipc::IPCResult RecvSync2() override;
+  mozilla::ipc::IPCResult RecvSync2();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     passed("ok");
     QuitParent();
   }
 };
 
 class TestSyncWakeupChild : public PTestSyncWakeupChild {
+  friend class PTestSyncWakeupChild;
+
  public:
   TestSyncWakeupChild();
   virtual ~TestSyncWakeupChild();
 
  protected:
-  virtual mozilla::ipc::IPCResult RecvStart() override;
+  mozilla::ipc::IPCResult RecvStart();
 
-  virtual mozilla::ipc::IPCResult RecvNote1() override;
+  mozilla::ipc::IPCResult RecvNote1();
 
-  virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
+  mozilla::ipc::IPCResult AnswerStackFrame();
 
-  virtual mozilla::ipc::IPCResult RecvNote2() override;
+  mozilla::ipc::IPCResult RecvNote2();
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) fail("unexpected destruction!");
     QuitChild();
   }
 
  private:
   bool mDone;
--- a/ipc/ipdl/test/cxx/TestUniquePtrIPC.h
+++ b/ipc/ipdl/test/cxx/TestUniquePtrIPC.h
@@ -38,20 +38,19 @@ class TestUniquePtrIPCParent : public PT
 class TestUniquePtrIPCChild : public PTestUniquePtrIPCChild {
  public:
   TestUniquePtrIPCChild() { MOZ_COUNT_CTOR(TestUniquePtrIPCChild); }
   virtual ~TestUniquePtrIPCChild() { MOZ_COUNT_DTOR(TestUniquePtrIPCChild); }
 
   mozilla::ipc::IPCResult RecvTestMessage(UniquePtr<int>&& aA1,
                                           UniquePtr<DummyStruct>&& aA2,
                                           const DummyStruct& aA3,
-                                          UniquePtr<int>&& aA4) override;
+                                          UniquePtr<int>&& aA4);
 
-  mozilla::ipc::IPCResult RecvTestSendReference(
-      UniquePtr<DummyStruct>&& aA) override;
+  mozilla::ipc::IPCResult RecvTestSendReference(UniquePtr<DummyStruct>&& aA);
 
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (NormalShutdown != why) {
       fail("Abnormal shutdown of child");
     }
     QuitChild();
   }
 };
--- a/ipc/ipdl/test/cxx/TestUrgency.h
+++ b/ipc/ipdl/test/cxx/TestUrgency.h
@@ -14,41 +14,41 @@ class TestUrgencyParent : public PTestUr
   TestUrgencyParent();
   virtual ~TestUrgencyParent();
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
 
-  mozilla::ipc::IPCResult RecvTest1(uint32_t *value) override;
-  mozilla::ipc::IPCResult RecvTest2() override;
-  mozilla::ipc::IPCResult RecvTest3(uint32_t *value) override;
+  mozilla::ipc::IPCResult RecvTest1(uint32_t *value);
+  mozilla::ipc::IPCResult RecvTest2();
+  mozilla::ipc::IPCResult RecvTest3(uint32_t *value);
   mozilla::ipc::IPCResult RecvTest4_Begin();
   mozilla::ipc::IPCResult RecvTest4_NestedSync();
-  mozilla::ipc::IPCResult RecvFinalTest_Begin() override;
+  mozilla::ipc::IPCResult RecvFinalTest_Begin();
 
   bool ShouldContinueFromReplyTimeout() override { return false; }
   virtual void ActorDestroy(ActorDestroyReason why) override {
     passed("ok");
     QuitParent();
   }
 
  private:
   bool inreply_;
 };
 
 class TestUrgencyChild : public PTestUrgencyChild {
  public:
   TestUrgencyChild();
   virtual ~TestUrgencyChild();
 
-  mozilla::ipc::IPCResult RecvStart() override;
-  mozilla::ipc::IPCResult RecvReply1(uint32_t *reply) override;
-  mozilla::ipc::IPCResult RecvReply2(uint32_t *reply) override;
+  mozilla::ipc::IPCResult RecvStart();
+  mozilla::ipc::IPCResult RecvReply1(uint32_t *reply);
+  mozilla::ipc::IPCResult RecvReply2(uint32_t *reply);
 
   virtual void ActorDestroy(ActorDestroyReason why) override { QuitChild(); }
 
  private:
   uint32_t test_;
 };
 
 }  // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/TestUrgentHangs.h
+++ b/ipc/ipdl/test/cxx/TestUrgentHangs.h
@@ -16,19 +16,19 @@ class TestUrgentHangsParent : public PTe
 
   static bool RunTestInProcesses() { return true; }
   static bool RunTestInThreads() { return false; }
 
   void Main();
   void SecondStage();
   void ThirdStage();
 
-  mozilla::ipc::IPCResult RecvTest1_2() override;
-  mozilla::ipc::IPCResult RecvTestInner() override;
-  mozilla::ipc::IPCResult RecvTestInnerUrgent() override;
+  mozilla::ipc::IPCResult RecvTest1_2();
+  mozilla::ipc::IPCResult RecvTestInner();
+  mozilla::ipc::IPCResult RecvTestInnerUrgent();
 
   bool ShouldContinueFromReplyTimeout() override { return false; }
   virtual void ActorDestroy(ActorDestroyReason why) override {
     if (mInnerCount != 1) {
       fail("wrong mInnerCount");
     }
     if (mInnerUrgentCount != 2) {
       fail("wrong mInnerUrgentCount");
@@ -41,24 +41,24 @@ class TestUrgentHangsParent : public PTe
   size_t mInnerCount, mInnerUrgentCount;
 };
 
 class TestUrgentHangsChild : public PTestUrgentHangsChild {
  public:
   TestUrgentHangsChild();
   virtual ~TestUrgentHangsChild();
 
-  mozilla::ipc::IPCResult RecvTest1_1() override;
-  mozilla::ipc::IPCResult RecvTest1_3() override;
-  mozilla::ipc::IPCResult RecvTest2() override;
-  mozilla::ipc::IPCResult RecvTest3() override;
-  mozilla::ipc::IPCResult RecvTest4() override;
-  mozilla::ipc::IPCResult RecvTest4_1() override;
-  mozilla::ipc::IPCResult RecvTest5() override;
-  mozilla::ipc::IPCResult RecvTest5_1() override;
+  mozilla::ipc::IPCResult RecvTest1_1();
+  mozilla::ipc::IPCResult RecvTest1_3();
+  mozilla::ipc::IPCResult RecvTest2();
+  mozilla::ipc::IPCResult RecvTest3();
+  mozilla::ipc::IPCResult RecvTest4();
+  mozilla::ipc::IPCResult RecvTest4_1();
+  mozilla::ipc::IPCResult RecvTest5();
+  mozilla::ipc::IPCResult RecvTest5_1();
 
   virtual void ActorDestroy(ActorDestroyReason why) override { QuitChild(); }
 };
 
 }  // namespace _ipdltest
 }  // namespace mozilla
 
 #endif  // ifndef mozilla__ipdltest_TestUrgentHangs_h
--- a/ipc/ipdl/test/cxx/moz.build
+++ b/ipc/ipdl/test/cxx/moz.build
@@ -6,16 +6,55 @@
 
 DIRS += ['app']
 
 EXPORTS.mozilla._ipdltest += [
     'IPDLUnitTestProcessChild.h',
     'IPDLUnitTests.h',
     'IPDLUnitTestTypes.h',
     'IPDLUnitTestUtils.h',
+    'TestActorPunning.h',
+    'TestAsyncReturns.h',
+    'TestBadActor.h',
+    'TestCancel.h',
+    'TestCrashCleanup.h',
+    'TestDataStructures.h',
+    'TestDemon.h',
+    'TestDesc.h',
+    'TestEndpointBridgeMain.h',
+    'TestEndpointOpens.h',
+    'TestFailedCtor.h',
+    'TestHangs.h',
+    'TestHighestPrio.h',
+    'TestInterruptErrorCleanup.h',
+    'TestInterruptRaces.h',
+    'TestInterruptShutdownRace.h',
+    'TestJSON.h',
+    'TestLatency.h',
+    'TestManyChildAllocs.h',
+    'TestMultiMgrs.h',
+    'TestNestedLoops.h',
+    'TestOffMainThreadPainting.h',
+    'TestRaceDeadlock.h',
+    'TestRaceDeferral.h',
+    'TestRacyInterruptReplies.h',
+    'TestRacyReentry.h',
+    'TestRacyUndefer.h',
+    'TestRPC.h',
+    'TestSanity.h',
+    'TestSelfManageRoot.h',
+    'TestShmem.h',
+    'TestShutdown.h',
+    'TestStackHooks.h',
+    'TestSyncError.h',
+    'TestSyncHang.h',
+    'TestSyncWakeup.h',
+    'TestUniquePtrIPC.h',
+    'TestUrgency.h',
+    'TestUrgentHangs.h',
 ]
 
 SOURCES += [
     'TestActorPunning.cpp',
     'TestAsyncReturns.cpp',
     'TestBadActor.cpp',
     'TestCancel.cpp',
     'TestCrashCleanup.cpp',