Bug 1451363 - part 5 - remove ProtocolName virtual function; r=mccr8
authorNathan Froyd <froydnj@mozilla.com>
Mon, 23 Apr 2018 14:13:36 -0400
changeset 468684 52f24d629711a20bf2f9717a41ae406bc6489f94
parent 468683 ccddb56135e6123ea6ece8e6dc8193e289308f59
child 468685 ce3f196660370950dc20fa5b9ffcd7c18d2c12dc
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1451363
milestone61.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 1451363 - part 5 - remove ProtocolName virtual function; r=mccr8 ProtocolName() is only used for producing error messages and annotating crash reports. But examining actual crash reports that would have used the result of ProtocolName() indicates that we can always tell what the erroring protocol is due to the stack backtrace. So having this virtual function around just provides duplicate information, and it takes up too much space in the vtable besides. Let's get rid of it.
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/media/ipc/VideoDecoderManagerChild.cpp
dom/media/ipc/VideoDecoderManagerChild.h
gfx/ipc/VsyncBridgeChild.cpp
gfx/ipc/VsyncBridgeChild.h
gfx/layers/ipc/CompositorManagerChild.cpp
gfx/layers/ipc/CompositorManagerChild.h
gfx/layers/ipc/ImageBridgeChild.cpp
gfx/layers/ipc/ImageBridgeChild.h
gfx/layers/ipc/UiCompositorControllerChild.cpp
gfx/layers/ipc/UiCompositorControllerChild.h
gfx/vr/ipc/VRManagerChild.cpp
gfx/vr/ipc/VRManagerChild.h
ipc/glue/FileDescriptor.cpp
ipc/glue/ProtocolUtils.cpp
ipc/glue/ProtocolUtils.h
ipc/ipdl/ipdl/lower.py
ipc/ipdl/test/cxx/TestActorPunning.cpp
ipc/ipdl/test/cxx/TestActorPunning.h
ipc/ipdl/test/cxx/TestBadActor.cpp
ipc/ipdl/test/cxx/TestBadActor.h
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -3434,30 +3434,27 @@ ContentChild::RecvGetFilesResponse(const
     child->Finished(succeeded ? NS_OK : NS_ERROR_OUT_OF_MEMORY);
   }
 
   mGetFilesPendingRequests.Remove(aUUID);
   return IPC_OK();
 }
 
 /* static */ void
-ContentChild::FatalErrorIfNotUsingGPUProcess(const char* const aProtocolName,
-                                             const char* const aErrorMsg,
+ContentChild::FatalErrorIfNotUsingGPUProcess(const char* const aErrorMsg,
                                              base::ProcessId aOtherPid)
 {
   // If we're communicating with the same process or the UI process then we
   // want to crash normally. Otherwise we want to just warn as the other end
   // must be the GPU process and it crashing shouldn't be fatal for us.
   if (aOtherPid == base::GetCurrentProcId() ||
       (GetSingleton() && GetSingleton()->OtherPid() == aOtherPid)) {
-    mozilla::ipc::FatalError(aProtocolName, aErrorMsg, false);
+    mozilla::ipc::FatalError(aErrorMsg, false);
   } else {
-    nsAutoCString formattedMessage("IPDL error [");
-    formattedMessage.AppendASCII(aProtocolName);
-    formattedMessage.AppendLiteral(R"(]: ")");
+    nsAutoCString formattedMessage("IPDL error: \"");
     formattedMessage.AppendASCII(aErrorMsg);
     formattedMessage.AppendLiteral(R"(".)");
     NS_WARNING(formattedMessage.get());
   }
 }
 
 PURLClassifierChild*
 ContentChild::AllocPURLClassifierChild(const Principal& aPrincipal,
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -678,18 +678,17 @@ public:
   }
 
   /**
    * Helper function for protocols that use the GPU process when available.
    * Overrides FatalError to just be a warning when communicating with the
    * GPU process since we don't want to crash the content process when the
    * GPU process crashes.
    */
-  static void FatalErrorIfNotUsingGPUProcess(const char* const aProtocolName,
-                                             const char* const aErrorMsg,
+  static void FatalErrorIfNotUsingGPUProcess(const char* const aErrorMsg,
                                              base::ProcessId aOtherPid);
 
   // This method is used by FileCreatorHelper for the creation of a BlobImpl.
   void
   FileCreationRequest(nsID& aUUID, FileCreatorHelper* aHelper,
                       const nsAString& aFullPath, const nsAString& aType,
                       const nsAString& aName,
                       const Optional<int64_t>& aLastModified,
--- a/dom/media/ipc/VideoDecoderManagerChild.cpp
+++ b/dom/media/ipc/VideoDecoderManagerChild.cpp
@@ -274,15 +274,15 @@ VideoDecoderManagerChild::DeallocateSurf
         if (ref->CanSend()) {
           ref->SendDeallocateSurfaceDescriptorGPUVideo(sd);
         }
       }),
     NS_DISPATCH_NORMAL);
 }
 
 void
-VideoDecoderManagerChild::HandleFatalError(const char* aName, const char* aMsg) const
+VideoDecoderManagerChild::HandleFatalError(const char* aMsg) const
 {
-  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aName, aMsg, OtherPid());
+  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aMsg, OtherPid());
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/media/ipc/VideoDecoderManagerChild.h
+++ b/dom/media/ipc/VideoDecoderManagerChild.h
@@ -63,17 +63,17 @@ public:
   bool CanSend();
 
 protected:
   void InitIPDL();
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
   void DeallocPVideoDecoderManagerChild() override;
 
-  void HandleFatalError(const char* aName, const char* aMsg) const override;
+  void HandleFatalError(const char* aMsg) const override;
 
   PVideoDecoderChild* AllocPVideoDecoderChild(const VideoInfo& aVideoInfo,
                                               const float& aFramerate,
                                               const layers::TextureFactoryIdentifier& aIdentifier,
                                               bool* aSuccess,
                                               nsCString* aBlacklistedD3D11Driver,
                                               nsCString* aBlacklistedD3D9Driver,
                                               nsCString* aErrorDescription) override;
--- a/gfx/ipc/VsyncBridgeChild.cpp
+++ b/gfx/ipc/VsyncBridgeChild.cpp
@@ -146,15 +146,15 @@ VsyncBridgeChild::DeallocPVsyncBridgeChi
 
 void
 VsyncBridgeChild::ProcessingError(Result aCode, const char* aReason)
 {
   MOZ_RELEASE_ASSERT(aCode == MsgDropped, "Processing error in VsyncBridgeChild");
 }
 
 void
-VsyncBridgeChild::HandleFatalError(const char* aName, const char* aMsg) const
+VsyncBridgeChild::HandleFatalError(const char* aMsg) const
 {
-  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aName, aMsg, OtherPid());
+  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aMsg, OtherPid());
 }
 
 } // namespace gfx
 } // namespace mozilla
--- a/gfx/ipc/VsyncBridgeChild.h
+++ b/gfx/ipc/VsyncBridgeChild.h
@@ -28,17 +28,17 @@ public:
   void Close();
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
   void DeallocPVsyncBridgeChild() override;
   void ProcessingError(Result aCode, const char* aReason) override;
 
   void NotifyVsync(TimeStamp aTimeStamp, const layers::LayersId& aLayersId);
 
-  virtual void HandleFatalError(const char* aName, const char* aMsg) const override;
+  virtual void HandleFatalError(const char* aMsg) const override;
 
 private:
   VsyncBridgeChild(RefPtr<VsyncIOThreadHolder>, const uint64_t& aProcessToken);
   ~VsyncBridgeChild();
 
   void Open(Endpoint<PVsyncBridgeChild>&& aEndpoint);
 
   void NotifyVsyncImpl(TimeStamp aTimeStamp, const layers::LayersId& aLayersId);
--- a/gfx/layers/ipc/CompositorManagerChild.cpp
+++ b/gfx/layers/ipc/CompositorManagerChild.cpp
@@ -239,19 +239,19 @@ CompositorManagerChild::AllocPCompositor
 bool
 CompositorManagerChild::DeallocPCompositorBridgeChild(PCompositorBridgeChild* aActor)
 {
   static_cast<CompositorBridgeChild*>(aActor)->Release();
   return true;
 }
 
 void
-CompositorManagerChild::HandleFatalError(const char* aName, const char* aMsg) const
+CompositorManagerChild::HandleFatalError(const char* aMsg) const
 {
-  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aName, aMsg, OtherPid());
+  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aMsg, OtherPid());
 }
 
 void
 CompositorManagerChild::ProcessingError(Result aCode, const char* aReason)
 {
   if (aCode != MsgDropped) {
     gfxDevCrash(gfx::LogReason::ProcessingError) << "Processing error in CompositorBridgeChild: " << int(aCode);
   }
--- a/gfx/layers/ipc/CompositorManagerChild.h
+++ b/gfx/layers/ipc/CompositorManagerChild.h
@@ -82,17 +82,17 @@ public:
     uint64_t id = GetNextResourceId();
     MOZ_RELEASE_ASSERT(id != 0);
     id |= (static_cast<uint64_t>(mNamespace) << 32);
     return wr::ToExternalImageId(id);
   }
 
   void ActorDestroy(ActorDestroyReason aReason) override;
 
-  void HandleFatalError(const char* aName, const char* aMsg) const override;
+  void HandleFatalError(const char* aMsg) const override;
 
   void ProcessingError(Result aCode, const char* aReason) override;
 
   PCompositorBridgeChild* AllocPCompositorBridgeChild(const CompositorBridgeOptions& aOptions) override;
 
   bool DeallocPCompositorBridgeChild(PCompositorBridgeChild* aActor) override;
 
   bool ShouldContinueFromReplyTimeout() override;
--- a/gfx/layers/ipc/ImageBridgeChild.cpp
+++ b/gfx/layers/ipc/ImageBridgeChild.cpp
@@ -1114,19 +1114,19 @@ ImageBridgeChild::ReleaseCompositable(co
 bool
 ImageBridgeChild::CanSend() const
 {
   MOZ_ASSERT(InImageBridgeChildThread());
   return mCanSend;
 }
 
 void
-ImageBridgeChild::HandleFatalError(const char* aName, const char* aMsg) const
+ImageBridgeChild::HandleFatalError(const char* aMsg) const
 {
-  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aName, aMsg, OtherPid());
+  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aMsg, OtherPid());
 }
 
 wr::MaybeExternalImageId
 ImageBridgeChild::GetNextExternalImageId()
 {
   static uint32_t sNextID = 1;
   ++sNextID;
   MOZ_RELEASE_ASSERT(sNextID != UINT32_MAX);
--- a/gfx/layers/ipc/ImageBridgeChild.h
+++ b/gfx/layers/ipc/ImageBridgeChild.h
@@ -343,17 +343,17 @@ public:
 
   virtual void UpdateFwdTransactionId() override { ++mFwdTransactionId; }
   virtual uint64_t GetFwdTransactionId() override { return mFwdTransactionId; }
 
   bool InForwarderThread() override {
     return InImageBridgeChildThread();
   }
 
-  virtual void HandleFatalError(const char* aName, const char* aMsg) const override;
+  virtual void HandleFatalError(const char* aMsg) const override;
 
   virtual wr::MaybeExternalImageId GetNextExternalImageId() override;
 
 protected:
   explicit ImageBridgeChild(uint32_t aNamespace);
   bool DispatchAllocShmemInternal(size_t aSize,
                                   SharedMemory::SharedMemoryType aType,
                                   Shmem* aShmem,
--- a/gfx/layers/ipc/UiCompositorControllerChild.cpp
+++ b/gfx/layers/ipc/UiCompositorControllerChild.cpp
@@ -252,19 +252,19 @@ UiCompositorControllerChild::DeallocPUiC
 
 void
 UiCompositorControllerChild::ProcessingError(Result aCode, const char* aReason)
 {
   MOZ_RELEASE_ASSERT(aCode == MsgDropped, "Processing error in UiCompositorControllerChild");
 }
 
 void
-UiCompositorControllerChild::HandleFatalError(const char* aName, const char* aMsg) const
+UiCompositorControllerChild::HandleFatalError(const char* aMsg) const
 {
-  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aName, aMsg, OtherPid());
+  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aMsg, OtherPid());
 }
 
 mozilla::ipc::IPCResult
 UiCompositorControllerChild::RecvToolbarAnimatorMessageFromCompositor(const int32_t& aMessage)
 {
 #if defined(MOZ_WIDGET_ANDROID)
   if (mWidget) {
     mWidget->RecvToolbarAnimatorMessageFromCompositor(aMessage);
--- a/gfx/layers/ipc/UiCompositorControllerChild.h
+++ b/gfx/layers/ipc/UiCompositorControllerChild.h
@@ -46,17 +46,17 @@ public:
   void SetBaseWidget(nsBaseWidget* aWidget);
   bool AllocPixelBuffer(const int32_t aSize, Shmem* aMem);
   bool DeallocPixelBuffer(Shmem& aMem);
 
 protected:
   void ActorDestroy(ActorDestroyReason aWhy) override;
   void DeallocPUiCompositorControllerChild() override;
   void ProcessingError(Result aCode, const char* aReason) override;
-  virtual void HandleFatalError(const char* aName, const char* aMsg) const override;
+  virtual void HandleFatalError(const char* aMsg) const override;
   mozilla::ipc::IPCResult RecvToolbarAnimatorMessageFromCompositor(const int32_t& aMessage) override;
   mozilla::ipc::IPCResult RecvRootFrameMetrics(const ScreenPoint& aScrollOffset, const CSSToScreenScale& aZoom) override;
   mozilla::ipc::IPCResult RecvScreenPixels(ipc::Shmem&& aMem, const ScreenIntSize& aSize) override;
 private:
   explicit UiCompositorControllerChild(const uint64_t& aProcessToken);
   ~UiCompositorControllerChild();
   void OpenForSameProcess();
   void OpenForGPUProcess(Endpoint<PUiCompositorControllerChild>&& aEndpoint);
--- a/gfx/vr/ipc/VRManagerChild.cpp
+++ b/gfx/vr/ipc/VRManagerChild.cpp
@@ -590,19 +590,19 @@ VRManagerChild::RemoveListener(dom::VREv
 
   mListeners.RemoveElement(aObserver);
   if (mListeners.IsEmpty()) {
     Unused << SendSetHaveEventListener(false);
   }
 }
 
 void
-VRManagerChild::HandleFatalError(const char* aName, const char* aMsg) const
+VRManagerChild::HandleFatalError(const char* aMsg) const
 {
-  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aName, aMsg, OtherPid());
+  dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aMsg, OtherPid());
 }
 
 void
 VRManagerChild::AddPromise(const uint32_t& aID, dom::Promise* aPromise)
 {
   MOZ_ASSERT(!mGamepadPromiseList.Get(aID, nullptr));
   mGamepadPromiseList.Put(aID, aPromise);
 }
--- a/gfx/vr/ipc/VRManagerChild.h
+++ b/gfx/vr/ipc/VRManagerChild.h
@@ -73,17 +73,17 @@ public:
   void UpdateDisplayInfo(nsTArray<VRDisplayInfo>& aDisplayUpdates);
   void FireDOMVRDisplayMountedEvent(uint32_t aDisplayID);
   void FireDOMVRDisplayUnmountedEvent(uint32_t aDisplayID);
   void FireDOMVRDisplayConnectEvent(uint32_t aDisplayID);
   void FireDOMVRDisplayDisconnectEvent(uint32_t aDisplayID);
   void FireDOMVRDisplayPresentChangeEvent(uint32_t aDisplayID);
   void FireDOMVRDisplayConnectEventsForLoad(dom::VREventObserver* aObserver);
 
-  virtual void HandleFatalError(const char* aName, const char* aMsg) const override;
+  virtual void HandleFatalError(const char* aMsg) const override;
 
 protected:
   explicit VRManagerChild();
   ~VRManagerChild();
   void Destroy();
   static void DeferredDestroy(RefPtr<VRManagerChild> aVRManagerChild);
 
   virtual PVRLayerChild* AllocPVRLayerChild(const uint32_t& aDisplayID,
--- a/ipc/glue/FileDescriptor.cpp
+++ b/ipc/glue/FileDescriptor.cpp
@@ -244,16 +244,15 @@ IPDLParamTraits<FileDescriptor>::Read(co
 {
   FileDescriptor::PickleType pfd;
   if (!ReadIPDLParam(aMsg, aIter, aActor, &pfd)) {
     return false;
   }
 
   *aResult = FileDescriptor(FileDescriptor::IPDLPrivate(), pfd);
   if (!aResult->IsValid()) {
-    printf_stderr("IPDL protocol Error: [%s] Received an invalid file descriptor\n",
-                  aActor->ProtocolName());
+    printf_stderr("IPDL protocol Error: Received an invalid file descriptor\n");
   }
   return true;
 }
 
 } // namespace ipc
 } // namespace mozilla
--- a/ipc/glue/ProtocolUtils.cpp
+++ b/ipc/glue/ProtocolUtils.cpp
@@ -55,17 +55,17 @@ MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLAT
 #endif
 
 namespace ipc {
 
 IPCResult
 IPCResult::Fail(NotNull<IProtocol*> actor, const char* where, const char* why)
 {
   // Calls top-level protocol to handle the error.
-  nsPrintfCString errorMsg("%s::%s %s\n", actor->ProtocolName(), where, why);
+  nsPrintfCString errorMsg("%s %s\n", where, why);
   actor->GetIPCChannel()->Listener()->ProcessingError(
     HasResultCodes::MsgProcessingError, errorMsg.get());
   return IPCResult(false);
 }
 
 class ChannelOpened : public IPC::Message
 {
 public:
@@ -269,32 +269,28 @@ ProtocolErrorBreakpoint(const char* aMsg
 {
     // Bugs that generate these error messages can be tough to
     // reproduce.  Log always in the hope that someone finds the error
     // message.
     printf_stderr("IPDL protocol error: %s\n", aMsg);
 }
 
 void
-FatalError(const char* aProtocolName, const char* aMsg, bool aIsParent)
+FatalError(const char* aMsg, bool aIsParent)
 {
   ProtocolErrorBreakpoint(aMsg);
 
-  nsAutoCString formattedMessage("IPDL error [");
-  formattedMessage.AppendASCII(aProtocolName);
-  formattedMessage.AppendLiteral("]: \"");
+  nsAutoCString formattedMessage("IPDL error: \"");
   formattedMessage.AppendASCII(aMsg);
   if (aIsParent) {
     // We're going to crash the parent process because at this time
     // there's no other really nice way of getting a minidump out of
     // this process if we're off the main thread.
     formattedMessage.AppendLiteral("\". Intentionally crashing.");
     NS_ERROR(formattedMessage.get());
-    CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCFatalErrorProtocol"),
-                                       nsDependentCString(aProtocolName));
     CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCFatalErrorMsg"),
                                        nsDependentCString(aMsg));
     AnnotateSystemError();
     MOZ_CRASH("IPC FatalError in the parent process!");
   } else {
     formattedMessage.AppendLiteral("\". abort()ing as a result.");
     MOZ_CRASH_UNSAFE_OOL(formattedMessage.get());
   }
@@ -455,28 +451,28 @@ ProcessId
 IProtocol::OtherPid() const
 {
   return Manager()->OtherPid();
 }
 
 void
 IProtocol::FatalError(const char* const aErrorMsg) const
 {
-  HandleFatalError(ProtocolName(), aErrorMsg);
+  HandleFatalError(aErrorMsg);
 }
 
 void
-IProtocol::HandleFatalError(const char* aProtocolName, const char* aErrorMsg) const
+IProtocol::HandleFatalError(const char* aErrorMsg) const
 {
   if (IProtocol* manager = Manager()) {
-    manager->HandleFatalError(aProtocolName, aErrorMsg);
+    manager->HandleFatalError(aErrorMsg);
     return;
   }
 
-  mozilla::ipc::FatalError(aProtocolName, aErrorMsg, mSide == ParentSide);
+  mozilla::ipc::FatalError(aErrorMsg, mSide == ParentSide);
 }
 
 bool
 IProtocol::AllocShmem(size_t aSize,
                       Shmem::SharedMemory::SharedMemoryType aType,
                       Shmem* aOutMem)
 {
   Shmem::id_t id;
--- a/ipc/glue/ProtocolUtils.h
+++ b/ipc/glue/ProtocolUtils.h
@@ -257,19 +257,18 @@ public:
     {
         return mState->DestroySharedMemory(aShmem);
     }
 
     // XXX odd ducks, acknowledged
     virtual ProcessId OtherPid() const;
     Side GetSide() const { return mSide; }
 
-    virtual const char* ProtocolName() const = 0;
     void FatalError(const char* const aErrorMsg) const;
-    virtual void HandleFatalError(const char* aProtocolName, const char* aErrorMsg) const;
+    virtual void HandleFatalError(const char* aErrorMsg) const;
 
     Maybe<IProtocol*> ReadActor(const IPC::Message* aMessage, PickleIterator* aIter, bool aNullable,
                                 const char* aActorDescription, int32_t aProtocolTypeId);
 
     virtual Result OnMessageReceived(const Message& aMessage) = 0;
     virtual Result OnMessageReceived(const Message& aMessage, Message *& aReply) = 0;
     virtual Result OnCallReceived(const Message& aMessage, Message *& aReply) = 0;
 
@@ -651,17 +650,17 @@ LogMessageForProtocol(const char* aTopLe
 
 MOZ_NEVER_INLINE void
 ProtocolErrorBreakpoint(const char* aMsg);
 
 // The code generator calls this function for errors which come from the
 // methods of protocols.  Doing this saves codesize by making the error
 // cases significantly smaller.
 MOZ_NEVER_INLINE void
-FatalError(const char* aProtocolName, const char* aMsg, bool aIsParent);
+FatalError(const char* aMsg, bool aIsParent);
 
 // The code generator calls this function for errors which are not
 // protocol-specific: errors in generated struct methods or errors in
 // transition functions, for instance.  Doing this saves codesize by
 // by making the error cases significantly smaller.
 MOZ_NEVER_INLINE void
 LogicError(const char* aMsg);
 
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -3491,26 +3491,16 @@ class _GenerateProtocolActorCode(ipdl.as
                     CppDirective('endif'),
                     ])
 
             self.cls.addstmts([ processnative, Whitespace.NL ])
 
         ## private methods
         self.cls.addstmt(Label.PRIVATE)
 
-        ## ProtocolName()
-        actorname = _actorName(p.name, self.side)
-        protocolname = MethodDefn(MethodDecl(
-            'ProtocolName', params=[],
-            const=1, methodspec=MethodSpec.OVERRIDE, ret=Type('char', const=1, ptr=1)))
-        protocolname.addstmts([
-            StmtReturn(ExprLiteral.String(actorname))
-        ])
-        self.cls.addstmts([ protocolname, Whitespace.NL ])
-
         ## DestroySubtree(bool normal)
         whyvar = ExprVar('why')
         subtreewhyvar = ExprVar('subtreewhy')
         kidsvar = ExprVar('kids')
         ivar = ExprVar('i')
         itervar = ExprVar('iter')
         ithkid = ExprIndex(kidsvar, ivar)
 
--- a/ipc/ipdl/test/cxx/TestActorPunning.cpp
+++ b/ipc/ipdl/test/cxx/TestActorPunning.cpp
@@ -24,22 +24,18 @@ TestActorPunningParent::RecvPun(PTestAct
     fail("shouldn't have received this message in the first place");
     return IPC_OK();
 }
 
 // By default, fatal errors kill the parent process, but this makes it
 // hard to test, so instead we use the previous behavior and kill the
 // child process.
 void
-TestActorPunningParent::HandleFatalError(const char* aProtocolName, const char* aErrorMsg) const
+TestActorPunningParent::HandleFatalError(const char* aErrorMsg) const
 {
-  if (!!strcmp(aProtocolName, "PTestActorPunningParent")) {
-    fail("wrong protocol hit a fatal error");
-  }
-
   if (!!strcmp(aErrorMsg, "Error deserializing 'PTestActorPunningSubParent'")) {
     fail("wrong fatal error");
   }
 
   ipc::ScopedProcessHandle otherProcessHandle;
   if (!base::OpenProcessHandle(OtherPid(), &otherProcessHandle.rwget())) {
     fail("couldn't open child process");
   } else {
--- a/ipc/ipdl/test/cxx/TestActorPunning.h
+++ b/ipc/ipdl/test/cxx/TestActorPunning.h
@@ -35,17 +35,17 @@ protected:
     virtual void ActorDestroy(ActorDestroyReason why) override
     {
         if (NormalShutdown == why)
             fail("should have died from error!");
         passed("ok");
         QuitParent();
     }
 
-    virtual void HandleFatalError(const char* aProtocolName, const char* aErrorMsg) const override;
+    virtual void HandleFatalError(const char* aErrorMsg) const override;
 };
 
 class TestActorPunningPunnedParent :
     public PTestActorPunningPunnedParent
 {
 public:
     TestActorPunningPunnedParent() {}
     virtual ~TestActorPunningPunnedParent() {}
--- a/ipc/ipdl/test/cxx/TestBadActor.cpp
+++ b/ipc/ipdl/test/cxx/TestBadActor.cpp
@@ -18,22 +18,18 @@ TestBadActorParent::Main()
 
   Unused << child->Call__delete__(child);
 }
 
 // By default, fatal errors kill the parent process, but this makes it
 // hard to test, so instead we use the previous behavior and kill the
 // child process.
 void
-TestBadActorParent::HandleFatalError(const char* aProtocolName, const char* aErrorMsg) const
+TestBadActorParent::HandleFatalError(const char* aErrorMsg) const
 {
-  if (!!strcmp(aProtocolName, "PTestBadActorSubParent")) {
-    fail("wrong protocol hit a fatal error");
-  }
-
   if (!!strcmp(aErrorMsg, "incoming message racing with actor deletion")) {
     fail("wrong fatal error");
   }
 
   ipc::ScopedProcessHandle otherProcessHandle;
   if (!base::OpenProcessHandle(OtherPid(), &otherProcessHandle.rwget())) {
     fail("couldn't open child process");
   } else {
--- a/ipc/ipdl/test/cxx/TestBadActor.h
+++ b/ipc/ipdl/test/cxx/TestBadActor.h
@@ -28,17 +28,17 @@ protected:
   virtual void ActorDestroy(ActorDestroyReason why) override
   {
     if (AbnormalShutdown != why)
       fail("unexpected destruction");
     passed("ok");
     QuitParent();
   }
 
-  virtual void HandleFatalError(const char* aProtocolName, const char* aErrorMsg) const override;
+  virtual void HandleFatalError(const char* aErrorMsg) const override;
 
   virtual PTestBadActorSubParent*
   AllocPTestBadActorSubParent() override;
 
   virtual bool
   DeallocPTestBadActorSubParent(PTestBadActorSubParent* actor) override {
     delete actor;
     return true;