Bug 1274343 - Add parent-to-child pipe streaming to IPCStream - part 1 - renaming PSendStream to PChildToParentStream, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 14 Mar 2017 12:28:58 +0100
changeset 347586 9a43ac75dfca73751f1da1272fb797f771c9c300
parent 347585 f6cbf8568e8ba6b295ce1cd4addd44781962f6cc
child 347587 cce5031e6ac46ae4a9b91a2a7667a7a0ad922c3b
push id31500
push userkwierso@gmail.com
push dateWed, 15 Mar 2017 00:19:11 +0000
treeherdermozilla-central@8dd496fd015a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1274343
milestone55.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 1274343 - Add parent-to-child pipe streaming to IPCStream - part 1 - renaming PSendStream to PChildToParentStream, r=smaug
dom/cache/AutoUtils.cpp
dom/cache/CacheOpParent.cpp
dom/cache/CacheTypes.ipdlh
dom/cache/PCache.ipdl
dom/cache/PCacheOp.ipdl
dom/cache/PCacheStorage.ipdl
dom/file/ipc/PBlob.ipdl
dom/flyweb/PFlyWebPublishedServer.ipdl
dom/ipc/ContentBridgeChild.cpp
dom/ipc/ContentBridgeChild.h
dom/ipc/ContentBridgeParent.cpp
dom/ipc/ContentBridgeParent.h
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/ipc/DOMTypes.ipdlh
dom/ipc/PContent.ipdl
dom/ipc/PContentBridge.ipdl
dom/ipc/nsIContentChild.cpp
dom/ipc/nsIContentChild.h
dom/ipc/nsIContentParent.cpp
dom/ipc/nsIContentParent.h
dom/network/PUDPSocket.ipdl
dom/webbrowserpersist/PWebBrowserPersistDocument.ipdl
ipc/glue/BackgroundChildImpl.cpp
ipc/glue/BackgroundChildImpl.h
ipc/glue/BackgroundImpl.cpp
ipc/glue/BackgroundParentImpl.cpp
ipc/glue/BackgroundParentImpl.h
ipc/glue/IPCStream.ipdlh
ipc/glue/IPCStreamUtils.cpp
ipc/glue/IPCStreamUtils.h
ipc/glue/PBackground.ipdl
ipc/glue/PChildToParentStream.ipdl
ipc/glue/PSendStream.ipdl
ipc/glue/SendStream.h
ipc/glue/SendStreamAlloc.h
ipc/glue/SendStreamChild.cpp
ipc/glue/SendStreamParent.cpp
ipc/glue/moz.build
netwerk/ipc/NeckoChannelParams.ipdlh
netwerk/ipc/PNecko.ipdl
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/websocket/PWebSocket.ipdl
--- a/dom/cache/AutoUtils.cpp
+++ b/dom/cache/AutoUtils.cpp
@@ -33,17 +33,17 @@ enum CleanupAction
   Forget,
   Delete
 };
 
 void
 CleanupChild(CacheReadStream& aReadStream, CleanupAction aAction)
 {
   // fds cleaned up by mStreamCleanupList
-  // PSendStream actors cleaned up by mStreamCleanupList
+  // PChildToParentStream actors cleaned up by mStreamCleanupList
 }
 
 void
 CleanupChild(CacheReadStreamOrVoid& aReadStreamOrVoid, CleanupAction aAction)
 {
   if (aReadStreamOrVoid.type() == CacheReadStreamOrVoid::Tvoid_t) {
     return;
   }
--- a/dom/cache/CacheOpParent.cpp
+++ b/dom/cache/CacheOpParent.cpp
@@ -215,16 +215,16 @@ CacheOpParent::DeserializeCacheStream(co
   // Option 1: One of our own ReadStreams was passed back to us with a stream
   //           control actor.
   stream = ReadStream::Create(readStream);
   if (stream) {
     return stream.forget();
   }
 
   // Option 2: A stream was serialized using normal methods or passed
-  //           as a PSendStream actor.  Use the standard method for
+  //           as a PChildToParentStream actor.  Use the standard method for
   //           extracting the resulting stream.
   return DeserializeIPCStream(readStream.stream());
 }
 
 } // namespace cache
 } // namespace dom
 } // namespace mozilla
--- a/dom/cache/CacheTypes.ipdlh
+++ b/dom/cache/CacheTypes.ipdlh
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PCache;
 include protocol PCacheStreamControl;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 include IPCStream;
 include ChannelInfo;
 include PBackgroundSharedTypes;
 
 using HeadersGuardEnum from "mozilla/dom/FetchIPCTypes.h";
 using ReferrerPolicy from "mozilla/dom/FetchIPCTypes.h";
 using RequestCredentials from "mozilla/dom/FetchIPCTypes.h";
 using RequestMode from "mozilla/dom/FetchIPCTypes.h";
--- a/dom/cache/PCache.ipdl
+++ b/dom/cache/PCache.ipdl
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PBackground;
 include protocol PBlob; // FIXME: bug 792908
 include protocol PCacheOp;
 include protocol PCacheStreamControl;
 include protocol PFileDescriptorSet;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 
 include CacheTypes;
 
 namespace mozilla {
 namespace dom {
 namespace cache {
 
 protocol PCache
--- a/dom/cache/PCacheOp.ipdl
+++ b/dom/cache/PCacheOp.ipdl
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PCache;
 include protocol PCacheStorage;
 include protocol PCacheStreamControl;
 include protocol PFileDescriptorSet;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 
 include CacheTypes;
 
 using mozilla::ErrorResult from "ipc/ErrorIPCUtils.h";
 
 namespace mozilla {
 namespace dom {
 namespace cache {
--- a/dom/cache/PCacheStorage.ipdl
+++ b/dom/cache/PCacheStorage.ipdl
@@ -3,17 +3,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PBackground;
 include protocol PBlob; // FIXME: bug 792908
 include protocol PCache;
 include protocol PCacheOp;
 include protocol PCacheStreamControl;
 include protocol PFileDescriptorSet;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 
 include CacheTypes;
 
 namespace mozilla {
 namespace dom {
 namespace cache {
 
 protocol PCacheStorage
--- a/dom/file/ipc/PBlob.ipdl
+++ b/dom/file/ipc/PBlob.ipdl
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PBackground;
 include protocol PBlobStream;
 include protocol PContent;
 include protocol PContentBridge;
 include protocol PFileDescriptorSet;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 
 include BlobTypes;
 include DOMTypes;
 include InputStreamParams;
 
 namespace mozilla {
 namespace dom {
 
--- a/dom/flyweb/PFlyWebPublishedServer.ipdl
+++ b/dom/flyweb/PFlyWebPublishedServer.ipdl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set sw=2 ts=8 et ft=cpp : */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PContent;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 include protocol PFileDescriptorSet;
 include protocol PTransportProvider;
 include FetchTypes;
 include ChannelInfo;
 include PBackgroundSharedTypes;
 
 namespace mozilla {
 namespace dom {
--- a/dom/ipc/ContentBridgeChild.cpp
+++ b/dom/ipc/ContentBridgeChild.cpp
@@ -85,20 +85,20 @@ ContentBridgeChild::SendPBrowserConstruc
 }
 
 PFileDescriptorSetChild*
 ContentBridgeChild::SendPFileDescriptorSetConstructor(const FileDescriptor& aFD)
 {
   return PContentBridgeChild::SendPFileDescriptorSetConstructor(aFD);
 }
 
-PSendStreamChild*
-ContentBridgeChild::SendPSendStreamConstructor(PSendStreamChild* aActor)
+PChildToParentStreamChild*
+ContentBridgeChild::SendPChildToParentStreamConstructor(PChildToParentStreamChild* aActor)
 {
-  return PContentBridgeChild::SendPSendStreamConstructor(aActor);
+  return PContentBridgeChild::SendPChildToParentStreamConstructor(aActor);
 }
 
 // This implementation is identical to ContentChild::GetCPOWManager but we can't
 // move it to nsIContentChild because it calls ManagedPJavaScriptChild() which
 // only exists in PContentChild and PContentBridgeChild.
 jsipc::CPOWManager*
 ContentBridgeChild::GetCPOWManager()
 {
@@ -163,26 +163,26 @@ ContentBridgeChild::AllocPBlobChild(cons
 }
 
 bool
 ContentBridgeChild::DeallocPBlobChild(PBlobChild* aActor)
 {
   return nsIContentChild::DeallocPBlobChild(aActor);
 }
 
-PSendStreamChild*
-ContentBridgeChild::AllocPSendStreamChild()
+PChildToParentStreamChild*
+ContentBridgeChild::AllocPChildToParentStreamChild()
 {
-  return nsIContentChild::AllocPSendStreamChild();
+  return nsIContentChild::AllocPChildToParentStreamChild();
 }
 
 bool
-ContentBridgeChild::DeallocPSendStreamChild(PSendStreamChild* aActor)
+ContentBridgeChild::DeallocPChildToParentStreamChild(PChildToParentStreamChild* aActor)
 {
-  return nsIContentChild::DeallocPSendStreamChild(aActor);
+  return nsIContentChild::DeallocPChildToParentStreamChild(aActor);
 }
 
 PFileDescriptorSetChild*
 ContentBridgeChild::AllocPFileDescriptorSetChild(const FileDescriptor& aFD)
 {
   return nsIContentChild::AllocPFileDescriptorSetChild(aFD);
 }
 
--- a/dom/ipc/ContentBridgeChild.h
+++ b/dom/ipc/ContentBridgeChild.h
@@ -43,18 +43,18 @@ public:
                                        const IPCTabContext& aContext,
                                        const uint32_t& aChromeFlags,
                                        const ContentParentId& aCpID,
                                        const bool& aIsForBrowser) override;
 
   virtual mozilla::ipc::PFileDescriptorSetChild*
   SendPFileDescriptorSetConstructor(const mozilla::ipc::FileDescriptor&) override;
 
-  virtual mozilla::ipc::PSendStreamChild*
-  SendPSendStreamConstructor(mozilla::ipc::PSendStreamChild*) override;
+  virtual mozilla::ipc::PChildToParentStreamChild*
+  SendPChildToParentStreamConstructor(mozilla::ipc::PChildToParentStreamChild*) override;
 
   FORWARD_SHMEM_ALLOCATOR_TO(PContentBridgeChild)
 
 protected:
   virtual ~ContentBridgeChild();
 
   virtual PBrowserChild* AllocPBrowserChild(const TabId& aTabId,
                                             const IPCTabContext& aContext,
@@ -70,20 +70,21 @@ protected:
                                                           const bool& aIsForBrowser) override;
 
   virtual mozilla::jsipc::PJavaScriptChild* AllocPJavaScriptChild() override;
   virtual bool DeallocPJavaScriptChild(mozilla::jsipc::PJavaScriptChild*) override;
 
   virtual PBlobChild* AllocPBlobChild(const BlobConstructorParams& aParams) override;
   virtual bool DeallocPBlobChild(PBlobChild*) override;
 
-  virtual mozilla::ipc::PSendStreamChild* AllocPSendStreamChild() override;
+  virtual mozilla::ipc::PChildToParentStreamChild*
+  AllocPChildToParentStreamChild() override;
 
   virtual bool
-  DeallocPSendStreamChild(mozilla::ipc::PSendStreamChild* aActor) override;
+  DeallocPChildToParentStreamChild(mozilla::ipc::PChildToParentStreamChild* aActor) override;
 
   virtual PFileDescriptorSetChild*
   AllocPFileDescriptorSetChild(const mozilla::ipc::FileDescriptor& aFD) override;
 
   virtual bool
   DeallocPFileDescriptorSetChild(mozilla::ipc::PFileDescriptorSetChild* aActor) override;
 
   DISALLOW_EVIL_CONSTRUCTORS(ContentBridgeChild);
--- a/dom/ipc/ContentBridgeParent.cpp
+++ b/dom/ipc/ContentBridgeParent.cpp
@@ -193,22 +193,22 @@ ContentBridgeParent::AllocPFileDescripto
 }
 
 bool
 ContentBridgeParent::DeallocPFileDescriptorSetParent(PFileDescriptorSetParent* aActor)
 {
   return nsIContentParent::DeallocPFileDescriptorSetParent(aActor);
 }
 
-PSendStreamParent*
-ContentBridgeParent::AllocPSendStreamParent()
+PChildToParentStreamParent*
+ContentBridgeParent::AllocPChildToParentStreamParent()
 {
-  return nsIContentParent::AllocPSendStreamParent();
+  return nsIContentParent::AllocPChildToParentStreamParent();
 }
 
 bool
-ContentBridgeParent::DeallocPSendStreamParent(PSendStreamParent* aActor)
+ContentBridgeParent::DeallocPChildToParentStreamParent(PChildToParentStreamParent* aActor)
 {
-  return nsIContentParent::DeallocPSendStreamParent(aActor);
+  return nsIContentParent::DeallocPChildToParentStreamParent(aActor);
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/ipc/ContentBridgeParent.h
+++ b/dom/ipc/ContentBridgeParent.h
@@ -109,19 +109,20 @@ protected:
 
   virtual bool DeallocPBrowserParent(PBrowserParent*) override;
 
   virtual PBlobParent*
   AllocPBlobParent(const BlobConstructorParams& aParams) override;
 
   virtual bool DeallocPBlobParent(PBlobParent*) override;
 
-  virtual PSendStreamParent* AllocPSendStreamParent() override;
+  virtual PChildToParentStreamParent* AllocPChildToParentStreamParent() override;
 
-  virtual bool DeallocPSendStreamParent(PSendStreamParent* aActor) override;
+  virtual bool
+  DeallocPChildToParentStreamParent(PChildToParentStreamParent* aActor) override;
 
   virtual PFileDescriptorSetParent*
   AllocPFileDescriptorSetParent(const mozilla::ipc::FileDescriptor&) override;
 
   virtual bool
   DeallocPFileDescriptorSetParent(PFileDescriptorSetParent*) override;
 
   DISALLOW_EVIL_CONSTRUCTORS(ContentBridgeParent);
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -44,17 +44,17 @@
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/psm/PSMContentListener.h"
 #include "mozilla/hal_sandbox/PHalChild.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/FileDescriptorSetChild.h"
 #include "mozilla/ipc/FileDescriptorUtils.h"
 #include "mozilla/ipc/GeckoChildProcessHost.h"
 #include "mozilla/ipc/ProcessChild.h"
-#include "mozilla/ipc/PSendStreamChild.h"
+#include "mozilla/ipc/PChildToParentStreamChild.h"
 #include "mozilla/ipc/TestShellChild.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "mozilla/layers/APZChild.h"
 #include "mozilla/layers/CompositorBridgeChild.h"
 #include "mozilla/layers/ContentProcessController.h"
 #include "mozilla/layers/ImageBridgeChild.h"
 #include "mozilla/layout/RenderFrameChild.h"
 #include "mozilla/net/NeckoChild.h"
@@ -1703,36 +1703,36 @@ ContentChild::AllocPPrintingChild()
 }
 
 bool
 ContentChild::DeallocPPrintingChild(PPrintingChild* printing)
 {
   return true;
 }
 
-PSendStreamChild*
-ContentChild::SendPSendStreamConstructor(PSendStreamChild* aActor)
+PChildToParentStreamChild*
+ContentChild::SendPChildToParentStreamConstructor(PChildToParentStreamChild* aActor)
 {
   if (IsShuttingDown()) {
     return nullptr;
   }
 
-  return PContentChild::SendPSendStreamConstructor(aActor);
+  return PContentChild::SendPChildToParentStreamConstructor(aActor);
 }
 
-PSendStreamChild*
-ContentChild::AllocPSendStreamChild()
+PChildToParentStreamChild*
+ContentChild::AllocPChildToParentStreamChild()
 {
-  return nsIContentChild::AllocPSendStreamChild();
+  return nsIContentChild::AllocPChildToParentStreamChild();
 }
 
 bool
-ContentChild::DeallocPSendStreamChild(PSendStreamChild* aActor)
+ContentChild::DeallocPChildToParentStreamChild(PChildToParentStreamChild* aActor)
 {
-  return nsIContentChild::DeallocPSendStreamChild(aActor);
+  return nsIContentChild::DeallocPChildToParentStreamChild(aActor);
 }
 
 PScreenManagerChild*
 ContentChild::AllocPScreenManagerChild(uint32_t* aNumberOfScreens,
                                        float* aSystemDefaultScale,
                                        bool* aSuccess)
 {
   // The ContentParent should never attempt to allocate the
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -228,21 +228,21 @@ public:
   virtual PNeckoChild* AllocPNeckoChild() override;
 
   virtual bool DeallocPNeckoChild(PNeckoChild*) override;
 
   virtual PPrintingChild* AllocPPrintingChild() override;
 
   virtual bool DeallocPPrintingChild(PPrintingChild*) override;
 
-  virtual PSendStreamChild*
-  SendPSendStreamConstructor(PSendStreamChild*) override;
+  virtual PChildToParentStreamChild*
+  SendPChildToParentStreamConstructor(PChildToParentStreamChild*) override;
 
-  virtual PSendStreamChild* AllocPSendStreamChild() override;
-  virtual bool DeallocPSendStreamChild(PSendStreamChild*) override;
+  virtual PChildToParentStreamChild* AllocPChildToParentStreamChild() override;
+  virtual bool DeallocPChildToParentStreamChild(PChildToParentStreamChild*) override;
 
   virtual PScreenManagerChild*
   AllocPScreenManagerChild(uint32_t* aNumberOfScreens,
                            float* aSystemDefaultScale,
                            bool* aSuccess) override;
 
   virtual bool DeallocPScreenManagerChild(PScreenManagerChild*) override;
 
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -64,17 +64,17 @@
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/embedding/printingui/PrintingParent.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/hal_sandbox/PHalParent.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/BackgroundParent.h"
 #include "mozilla/ipc/FileDescriptorUtils.h"
-#include "mozilla/ipc/PSendStreamParent.h"
+#include "mozilla/ipc/PChildToParentStreamParent.h"
 #include "mozilla/ipc/TestShellParent.h"
 #include "mozilla/ipc/IPCStreamUtils.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "mozilla/layers/PAPZParent.h"
 #include "mozilla/layers/CompositorThread.h"
 #include "mozilla/layers/ImageBridgeParent.h"
 #include "mozilla/layers/LayerTreeOwnerTracker.h"
 #include "mozilla/layout/RenderFrameParent.h"
@@ -3171,26 +3171,26 @@ ContentParent::GetPrintingParent()
 {
   MOZ_ASSERT(mPrintingParent);
 
   RefPtr<embedding::PrintingParent> printingParent = mPrintingParent;
   return printingParent.forget();
 }
 #endif
 
-PSendStreamParent*
-ContentParent::AllocPSendStreamParent()
-{
-  return nsIContentParent::AllocPSendStreamParent();
+PChildToParentStreamParent*
+ContentParent::AllocPChildToParentStreamParent()
+{
+  return nsIContentParent::AllocPChildToParentStreamParent();
 }
 
 bool
-ContentParent::DeallocPSendStreamParent(PSendStreamParent* aActor)
-{
-  return nsIContentParent::DeallocPSendStreamParent(aActor);
+ContentParent::DeallocPChildToParentStreamParent(PChildToParentStreamParent* aActor)
+{
+  return nsIContentParent::DeallocPChildToParentStreamParent(aActor);
 }
 
 PScreenManagerParent*
 ContentParent::AllocPScreenManagerParent(uint32_t* aNumberOfScreens,
                                          float* aSystemDefaultScale,
                                          bool* aSuccess)
 {
   return new ScreenManagerParent(aNumberOfScreens, aSystemDefaultScale, aSuccess);
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -420,18 +420,19 @@ public:
 
 #if defined(NS_PRINTING)
   /**
    * @return the PrintingParent for this ContentParent.
    */
   already_AddRefed<embedding::PrintingParent> GetPrintingParent();
 #endif
 
-  virtual PSendStreamParent* AllocPSendStreamParent() override;
-  virtual bool DeallocPSendStreamParent(PSendStreamParent* aActor) override;
+  virtual PChildToParentStreamParent* AllocPChildToParentStreamParent() override;
+  virtual bool
+  DeallocPChildToParentStreamParent(PChildToParentStreamParent* aActor) override;
 
   virtual PScreenManagerParent*
   AllocPScreenManagerParent(uint32_t* aNumberOfScreens,
                             float* aSystemDefaultScale,
                             bool* aSuccess) override;
 
   virtual bool
   DeallocPScreenManagerParent(PScreenManagerParent* aActor) override;
--- a/dom/ipc/DOMTypes.ipdlh
+++ b/dom/ipc/DOMTypes.ipdlh
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
 /* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PBlob;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 include IPCStream;
 include ProtocolTypes;
 
 using struct mozilla::void_t
   from "ipc/IPCMessageUtils.h";
 
 using struct mozilla::SerializedStructuredCloneBuffer
   from "ipc/IPCMessageUtils.h";
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -21,17 +21,17 @@ include protocol PProcessHangMonitor;
 include protocol PImageBridge;
 include protocol PMedia;
 include protocol PNecko;
 include protocol PGMPContent;
 include protocol PGMPService;
 include protocol PPluginModule;
 include protocol PGMP;
 include protocol PPrinting;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 include protocol POfflineCacheUpdate;
 include protocol PRenderFrame;
 include protocol PScreenManager;
 include protocol PSpeechSynthesis;
 include protocol PStorage;
 include protocol PTestShell;
 include protocol PJavaScript;
 include protocol PRemoteSpellcheckEngine;
@@ -281,17 +281,17 @@ nested(upto inside_cpow) sync protocol P
     manages PFileDescriptorSet;
     manages PHal;
     manages PHandlerService;
     manages PHeapSnapshotTempFileHelper;
     manages PMedia;
     manages PNecko;
     manages POfflineCacheUpdate;
     manages PPrinting;
-    manages PSendStream;
+    manages PChildToParentStream;
     manages PScreenManager;
     manages PSpeechSynthesis;
     manages PStorage;
     manages PTestShell;
     manages PJavaScript;
     manages PRemoteSpellcheckEngine;
     manages PWebBrowserPersistDocument;
     manages PWebrtcGlobal;
@@ -696,17 +696,17 @@ parent:
     nested(inside_cpow) async PHal();
 
     async PHeapSnapshotTempFileHelper();
 
     async PNecko();
 
     async PPrinting();
 
-    async PSendStream();
+    async PChildToParentStream();
 
     nested(inside_sync) sync PScreenManager()
         returns (uint32_t numberOfScreens,
                  float systemDefaultScale,
                  bool success);
 
     async PSpeechSynthesis();
 
--- a/dom/ipc/PContentBridge.ipdl
+++ b/dom/ipc/PContentBridge.ipdl
@@ -4,17 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PBlob;
 include protocol PBrowser;
 include protocol PContent;
 include protocol PJavaScript;
 include protocol PFileDescriptorSet;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 
 include DOMTypes;
 include JavaScriptTypes;
 include PTabContext;
 
 using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
 using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
 using mozilla::dom::ContentParentId from "mozilla/dom/ipc/IdType.h";
@@ -33,26 +33,26 @@ namespace dom {
  * share PBrowsers and send messages to each other.
  */
 nested(upto inside_cpow) sync protocol PContentBridge
 {
     manages PBlob;
     manages PBrowser;
     manages PFileDescriptorSet;
     manages PJavaScript;
-    manages PSendStream;
+    manages PChildToParentStream;
 
 parent:
     sync SyncMessage(nsString aMessage, ClonedMessageData aData,
                      CpowEntry[] aCpows, Principal aPrincipal)
       returns (StructuredCloneData[] retval);
 
     async PJavaScript();
 
-    async PSendStream();
+    async PChildToParentStream();
 
 both:
     // Both the parent and the child can construct the PBrowser.
     // See the comment in PContent::PBrowser().
     async PBrowser(TabId tabId, IPCTabContext context, uint32_t chromeFlags,
                    ContentParentId cpId, bool isForBrowser);
 
     async PBlob(BlobConstructorParams params);
--- a/dom/ipc/nsIContentChild.cpp
+++ b/dom/ipc/nsIContentChild.cpp
@@ -130,24 +130,24 @@ nsIContentChild::GetOrCreateActorForBlob
   MOZ_ASSERT(aImpl);
 
   BlobChild* actor = BlobChild::GetOrCreate(this, aImpl);
   NS_ENSURE_TRUE(actor, nullptr);
 
   return actor;
 }
 
-PSendStreamChild*
-nsIContentChild::AllocPSendStreamChild()
+PChildToParentStreamChild*
+nsIContentChild::AllocPChildToParentStreamChild()
 {
-  MOZ_CRASH("PSendStreamChild actors should be manually constructed!");
+  MOZ_CRASH("PChildToParentStreamChild actors should be manually constructed!");
 }
 
 bool
-nsIContentChild::DeallocPSendStreamChild(PSendStreamChild* aActor)
+nsIContentChild::DeallocPChildToParentStreamChild(PChildToParentStreamChild* aActor)
 {
   delete aActor;
   return true;
 }
 
 PFileDescriptorSetChild*
 nsIContentChild::AllocPFileDescriptorSetChild(const FileDescriptor& aFD)
 {
--- a/dom/ipc/nsIContentChild.h
+++ b/dom/ipc/nsIContentChild.h
@@ -24,17 +24,17 @@ class nsString;
 namespace IPC {
 class Principal;
 } // namespace IPC
 
 namespace mozilla {
 namespace ipc {
 class FileDescriptor;
 class PFileDescriptorSetChild;
-class PSendStreamChild;
+class PChildToParentStreamChild;
 class Shmem;
 } // namespace ipc
 
 namespace jsipc {
 class PJavaScriptChild;
 class CpowEntry;
 } // namespace jsipc
 
@@ -69,18 +69,18 @@ public:
                           const IPCTabContext& aContext,
                           const uint32_t& aChromeFlags,
                           const ContentParentId& aCpID,
                           const bool& aIsForBrowser) = 0;
 
   virtual mozilla::ipc::PFileDescriptorSetChild*
   SendPFileDescriptorSetConstructor(const mozilla::ipc::FileDescriptor&) = 0;
 
-  virtual mozilla::ipc::PSendStreamChild*
-  SendPSendStreamConstructor(mozilla::ipc::PSendStreamChild*) = 0;
+  virtual mozilla::ipc::PChildToParentStreamChild*
+  SendPChildToParentStreamConstructor(mozilla::ipc::PChildToParentStreamChild*) = 0;
 
 protected:
   virtual jsipc::PJavaScriptChild* AllocPJavaScriptChild();
   virtual bool DeallocPJavaScriptChild(jsipc::PJavaScriptChild*);
 
   virtual PBrowserChild* AllocPBrowserChild(const TabId& aTabId,
                                             const IPCTabContext& aContext,
                                             const uint32_t& aChromeFlags,
@@ -94,19 +94,20 @@ protected:
                                                           const uint32_t& aChromeFlags,
                                                           const ContentParentId& aCpID,
                                                           const bool& aIsForBrowse);
 
   virtual PBlobChild* AllocPBlobChild(const BlobConstructorParams& aParams);
 
   virtual bool DeallocPBlobChild(PBlobChild* aActor);
 
-  virtual mozilla::ipc::PSendStreamChild* AllocPSendStreamChild();
+  virtual mozilla::ipc::PChildToParentStreamChild* AllocPChildToParentStreamChild();
 
-  virtual bool DeallocPSendStreamChild(mozilla::ipc::PSendStreamChild* aActor);
+  virtual bool
+  DeallocPChildToParentStreamChild(mozilla::ipc::PChildToParentStreamChild* aActor);
 
   virtual mozilla::ipc::PFileDescriptorSetChild*
   AllocPFileDescriptorSetChild(const mozilla::ipc::FileDescriptor& aFD);
 
   virtual bool
   DeallocPFileDescriptorSetChild(mozilla::ipc::PFileDescriptorSetChild* aActor);
 
   virtual mozilla::ipc::IPCResult RecvAsyncMessage(const nsString& aMsg,
--- a/dom/ipc/nsIContentParent.cpp
+++ b/dom/ipc/nsIContentParent.cpp
@@ -255,24 +255,24 @@ nsIContentParent::AllocPFileDescriptorSe
 
 bool
 nsIContentParent::DeallocPFileDescriptorSetParent(PFileDescriptorSetParent* aActor)
 {
   delete static_cast<FileDescriptorSetParent*>(aActor);
   return true;
 }
 
-PSendStreamParent*
-nsIContentParent::AllocPSendStreamParent()
+PChildToParentStreamParent*
+nsIContentParent::AllocPChildToParentStreamParent()
 {
-  return mozilla::ipc::AllocPSendStreamParent();
+  return mozilla::ipc::AllocPChildToParentStreamParent();
 }
 
 bool
-nsIContentParent::DeallocPSendStreamParent(PSendStreamParent* aActor)
+nsIContentParent::DeallocPChildToParentStreamParent(PChildToParentStreamParent* aActor)
 {
   delete aActor;
   return true;
 }
 
 mozilla::ipc::IPCResult
 nsIContentParent::RecvAsyncMessage(const nsString& aMsg,
                                    InfallibleTArray<CpowEntry>&& aCpows,
--- a/dom/ipc/nsIContentParent.h
+++ b/dom/ipc/nsIContentParent.h
@@ -27,17 +27,17 @@ namespace mozilla {
 
 namespace jsipc {
 class PJavaScriptParent;
 class CpowEntry;
 } // namespace jsipc
 
 namespace ipc {
 class PFileDescriptorSetParent;
-class PSendStreamParent;
+class PChildToParentStreamParent;
 }
 
 namespace dom {
 
 class Blob;
 class BlobConstructorParams;
 class BlobImpl;
 class BlobParent;
@@ -106,19 +106,20 @@ protected: // IPDL methods
   virtual bool DeallocPBlobParent(PBlobParent* aActor);
 
   virtual mozilla::ipc::PFileDescriptorSetParent*
   AllocPFileDescriptorSetParent(const mozilla::ipc::FileDescriptor& aFD);
 
   virtual bool
   DeallocPFileDescriptorSetParent(mozilla::ipc::PFileDescriptorSetParent* aActor);
 
-  virtual mozilla::ipc::PSendStreamParent* AllocPSendStreamParent();
+  virtual mozilla::ipc::PChildToParentStreamParent* AllocPChildToParentStreamParent();
 
-  virtual bool DeallocPSendStreamParent(mozilla::ipc::PSendStreamParent* aActor);
+  virtual bool
+  DeallocPChildToParentStreamParent(mozilla::ipc::PChildToParentStreamParent* aActor);
 
   virtual mozilla::ipc::IPCResult RecvSyncMessage(const nsString& aMsg,
                                                   const ClonedMessageData& aData,
                                                   InfallibleTArray<jsipc::CpowEntry>&& aCpows,
                                                   const IPC::Principal& aPrincipal,
                                                   nsTArray<ipc::StructuredCloneData>* aRetvals);
   virtual mozilla::ipc::IPCResult RecvRpcMessage(const nsString& aMsg,
                                                  const ClonedMessageData& aData,
--- a/dom/network/PUDPSocket.ipdl
+++ b/dom/network/PUDPSocket.ipdl
@@ -4,17 +4,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PNecko;
 include protocol PBackground;
 include protocol PBlob; //FIXME: bug #792908
 include protocol PFileDescriptorSet; // FIXME: bug #792908
-include protocol PSendStream; //FIXME: bug #792908
+include protocol PChildToParentStream; //FIXME: bug #792908
 
 include IPCStream;
 
 include "mozilla/net/NeckoMessageUtils.h";
 include "mozilla/net/DNS.h";
 include "prio.h";
 
 using mozilla::net::NetAddr from "mozilla/net/DNS.h";
--- a/dom/webbrowserpersist/PWebBrowserPersistDocument.ipdl
+++ b/dom/webbrowserpersist/PWebBrowserPersistDocument.ipdl
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PContent;
 include protocol PWebBrowserPersistResources;
 include protocol PWebBrowserPersistSerialize;
 include protocol PFileDescriptorSet;
-include protocol PSendStream;
+include protocol PChildToParentStream; //FIXME: bug #792908
 
 include IPCStream;
 
 namespace mozilla {
 
 // nsIWebBrowserPersistDocument has attributes which can be read
 // synchronously.  To avoid using sync IPC for them, the actor sends
 // this structure from the child to the parent before the parent actor
--- a/ipc/glue/BackgroundChildImpl.cpp
+++ b/ipc/glue/BackgroundChildImpl.cpp
@@ -23,17 +23,17 @@
 #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h"
 #include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsChild.h"
 #include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/dom/quota/PQuotaChild.h"
 #include "mozilla/dom/GamepadEventChannelChild.h"
 #include "mozilla/dom/GamepadTestChannelChild.h"
 #include "mozilla/dom/MessagePortChild.h"
 #include "mozilla/ipc/PBackgroundTestChild.h"
-#include "mozilla/ipc/PSendStreamChild.h"
+#include "mozilla/ipc/PChildToParentStreamChild.h"
 #include "mozilla/layout/VsyncChild.h"
 #include "mozilla/net/PUDPSocketChild.h"
 #include "mozilla/dom/network/UDPSocketChild.h"
 #include "nsID.h"
 #include "nsTraceRefcnt.h"
 
 namespace {
 
@@ -398,24 +398,24 @@ bool
 BackgroundChildImpl::DeallocPMessagePortChild(PMessagePortChild* aActor)
 {
   RefPtr<dom::MessagePortChild> child =
     dont_AddRef(static_cast<dom::MessagePortChild*>(aActor));
   MOZ_ASSERT(child);
   return true;
 }
 
-PSendStreamChild*
-BackgroundChildImpl::AllocPSendStreamChild()
+PChildToParentStreamChild*
+BackgroundChildImpl::AllocPChildToParentStreamChild()
 {
-  MOZ_CRASH("PSendStreamChild actors should be manually constructed!");
+  MOZ_CRASH("PChildToParentStreamChild actors should be manually constructed!");
 }
 
 bool
-BackgroundChildImpl::DeallocPSendStreamChild(PSendStreamChild* aActor)
+BackgroundChildImpl::DeallocPChildToParentStreamChild(PChildToParentStreamChild* aActor)
 {
   delete aActor;
   return true;
 }
 
 PAsmJSCacheEntryChild*
 BackgroundChildImpl::AllocPAsmJSCacheEntryChild(
                                const dom::asmjscache::OpenMode& aOpenMode,
--- a/ipc/glue/BackgroundChildImpl.h
+++ b/ipc/glue/BackgroundChildImpl.h
@@ -135,21 +135,21 @@ protected:
 
   virtual PMessagePortChild*
   AllocPMessagePortChild(const nsID& aUUID, const nsID& aDestinationUUID,
                          const uint32_t& aSequenceID) override;
 
   virtual bool
   DeallocPMessagePortChild(PMessagePortChild* aActor) override;
 
-  virtual PSendStreamChild*
-  AllocPSendStreamChild() override;
+  virtual PChildToParentStreamChild*
+  AllocPChildToParentStreamChild() override;
 
   virtual bool
-  DeallocPSendStreamChild(PSendStreamChild* aActor) override;
+  DeallocPChildToParentStreamChild(PChildToParentStreamChild* aActor) override;
 
   virtual PAsmJSCacheEntryChild*
   AllocPAsmJSCacheEntryChild(const dom::asmjscache::OpenMode& aOpenMode,
                              const dom::asmjscache::WriteParams& aWriteParams,
                              const PrincipalInfo& aPrincipalInfo) override;
 
   virtual bool
   DeallocPAsmJSCacheEntryChild(PAsmJSCacheEntryChild* aActor) override;
--- a/ipc/glue/BackgroundImpl.cpp
+++ b/ipc/glue/BackgroundImpl.cpp
@@ -49,17 +49,17 @@
 #ifdef RELEASE_OR_BETA
 #define THREADSAFETY_ASSERT MOZ_ASSERT
 #else
 #define THREADSAFETY_ASSERT MOZ_RELEASE_ASSERT
 #endif
 
 #define CRASH_IN_CHILD_PROCESS(_msg)                                           \
   do {                                                                         \
-    if (XRE_IsParentProcess()) {                                                     \
+    if (XRE_IsParentProcess()) {                                               \
       MOZ_ASSERT(false, _msg);                                                 \
     } else {                                                                   \
       MOZ_CRASH(_msg);                                                         \
     }                                                                          \
   }                                                                            \
   while (0)
 
 using namespace mozilla;
--- a/ipc/glue/BackgroundParentImpl.cpp
+++ b/ipc/glue/BackgroundParentImpl.cpp
@@ -28,17 +28,17 @@
 #include "mozilla/dom/cache/ActorUtils.h"
 #include "mozilla/dom/indexedDB/ActorsParent.h"
 #include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/dom/quota/ActorsParent.h"
 #include "mozilla/ipc/BackgroundParent.h"
 #include "mozilla/ipc/BackgroundUtils.h"
 #include "mozilla/ipc/PBackgroundSharedTypes.h"
 #include "mozilla/ipc/PBackgroundTestParent.h"
-#include "mozilla/ipc/PSendStreamParent.h"
+#include "mozilla/ipc/PChildToParentStreamParent.h"
 #include "mozilla/ipc/SendStreamAlloc.h"
 #include "mozilla/layout/VsyncParent.h"
 #include "mozilla/dom/network/UDPSocketParent.h"
 #include "mozilla/Preferences.h"
 #include "nsNetUtil.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsProxyRelease.h"
 #include "mozilla/RefPtr.h"
@@ -297,24 +297,25 @@ BackgroundParentImpl::DeallocPFileDescri
   AssertIsInMainProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   delete static_cast<FileDescriptorSetParent*>(aActor);
   return true;
 }
 
-PSendStreamParent*
-BackgroundParentImpl::AllocPSendStreamParent()
+PChildToParentStreamParent*
+BackgroundParentImpl::AllocPChildToParentStreamParent()
 {
-  return mozilla::ipc::AllocPSendStreamParent();
+  return mozilla::ipc::AllocPChildToParentStreamParent();
 }
 
 bool
-BackgroundParentImpl::DeallocPSendStreamParent(PSendStreamParent* aActor)
+BackgroundParentImpl::DeallocPChildToParentStreamParent(
+                                             PChildToParentStreamParent* aActor)
 {
   delete aActor;
   return true;
 }
 
 BackgroundParentImpl::PVsyncParent*
 BackgroundParentImpl::AllocPVsyncParent()
 {
--- a/ipc/glue/BackgroundParentImpl.h
+++ b/ipc/glue/BackgroundParentImpl.h
@@ -96,21 +96,21 @@ protected:
   RecvPBroadcastChannelConstructor(PBroadcastChannelParent* actor,
                                    const PrincipalInfo& aPrincipalInfo,
                                    const nsCString& origin,
                                    const nsString& channel) override;
 
   virtual bool
   DeallocPBroadcastChannelParent(PBroadcastChannelParent* aActor) override;
 
-  virtual PSendStreamParent*
-  AllocPSendStreamParent() override;
+  virtual PChildToParentStreamParent*
+  AllocPChildToParentStreamParent() override;
 
   virtual bool
-  DeallocPSendStreamParent(PSendStreamParent* aActor) override;
+  DeallocPChildToParentStreamParent(PChildToParentStreamParent* aActor) override;
 
   virtual PServiceWorkerManagerParent*
   AllocPServiceWorkerManagerParent() override;
 
   virtual bool
   DeallocPServiceWorkerManagerParent(PServiceWorkerManagerParent* aActor) override;
 
   virtual PCamerasParent*
--- a/ipc/glue/IPCStream.ipdlh
+++ b/ipc/glue/IPCStream.ipdlh
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-include protocol PSendStream;
+include protocol PChildToParentStream;
 include BlobTypes;
 include InputStreamParams;
 
 namespace mozilla {
 namespace ipc {
 
 // Do not use this directly.  See IPCStream below.
 struct InputStreamParamsWithFds
@@ -17,17 +17,17 @@ struct InputStreamParamsWithFds
 };
 
 // Use IPCStream or OptionalIPCStream in your ipdl to represent serialized
 // nsIInputStreams.  Then use AutoIPCStream from IPCStreamUtils.h to perform
 // the serialization.
 union IPCStream
 {
   InputStreamParamsWithFds;
-  PSendStream;
+  PChildToParentStream;
 };
 
 union OptionalIPCStream
 {
   IPCStream;
   void_t;
 };
 
--- a/ipc/glue/IPCStreamUtils.cpp
+++ b/ipc/glue/IPCStreamUtils.cpp
@@ -172,17 +172,17 @@ SerializeInputStream(nsIInputStream* aSt
 
     rv = NS_AsyncCopy(aStream, sink, target, NS_ASYNCCOPY_VIA_READSEGMENTS, kBufferSize);
     MOZ_ASSERT(NS_SUCCEEDED(rv));
   }
 
   MOZ_ASSERT(asyncStream);
   aValue = SendStreamChild::Create(asyncStream, aManager);
 
-  if (!aValue.get_PSendStreamChild()) {
+  if (!aValue.get_PChildToParentStreamChild()) {
     MOZ_CRASH("SendStream creation failed!");
   }
 }
 
 template<typename M>
 void
 SerializeInputStream(nsIInputStream* aStream, OptionalIPCStream& aValue,
                      M* aManager)
@@ -244,20 +244,20 @@ CleanupIPCStream(IPCStream& aValue, bool
       if (!aConsumedByIPC) {
         Unused << fdSetActor->Send__delete__(fdSetActor);
       }
     }
 
     return;
   }
 
-  MOZ_ASSERT(aValue.type() == IPCStream::TPSendStreamChild);
+  MOZ_ASSERT(aValue.type() == IPCStream::TPChildToParentStreamChild);
 
   auto sendStream =
-    static_cast<SendStreamChild*>(aValue.get_PSendStreamChild());
+    static_cast<SendStreamChild*>(aValue.get_PChildToParentStreamChild());
 
   if (!aConsumedByIPC) {
     sendStream->StartDestroy();
     return;
   }
 
   // If the SendStream was taken to be sent to the parent, then we need to
   // start it before forgetting about it.
@@ -274,23 +274,23 @@ CleanupIPCStream(OptionalIPCStream& aVal
   CleanupIPCStream(aValue.get_IPCStream(), aConsumedByIPC);
 }
 
 } // anonymous namespace
 
 already_AddRefed<nsIInputStream>
 DeserializeIPCStream(const IPCStream& aValue)
 {
-  if (aValue.type() == IPCStream::TPSendStreamParent) {
+  if (aValue.type() == IPCStream::TPChildToParentStreamParent) {
     auto sendStream =
-      static_cast<SendStreamParent*>(aValue.get_PSendStreamParent());
+      static_cast<SendStreamParent*>(aValue.get_PChildToParentStreamParent());
     return sendStream->TakeReader();
   }
 
-  // Note, we explicitly do not support deserializing the PSendStream actor on
+  // Note, we explicitly do not support deserializing the PChildToParentStream actor on
   // the child side.  It can only be sent from child to parent.
   MOZ_ASSERT(aValue.type() == IPCStream::TInputStreamParamsWithFds);
 
   const InputStreamParamsWithFds& streamWithFds =
     aValue.get_InputStreamParamsWithFds();
 
   AutoTArray<FileDescriptor, 4> fds;
   if (streamWithFds.optionalFds().type() ==
@@ -333,17 +333,17 @@ DeserializeIPCStream(const OptionalIPCSt
   return DeserializeIPCStream(aValue.get_IPCStream());
 }
 
 namespace {
 
 void
 AssertValidValueToTake(const IPCStream& aVal)
 {
-  MOZ_ASSERT(aVal.type() == IPCStream::TPSendStreamChild ||
+  MOZ_ASSERT(aVal.type() == IPCStream::TPChildToParentStreamChild ||
              aVal.type() == IPCStream::TInputStreamParamsWithFds);
 }
 
 void
 AssertValidValueToTake(const OptionalIPCStream& aVal)
 {
   MOZ_ASSERT(aVal.type() == OptionalIPCStream::Tvoid_t ||
              aVal.type() == OptionalIPCStream::TIPCStream);
--- a/ipc/glue/IPCStreamUtils.h
+++ b/ipc/glue/IPCStreamUtils.h
@@ -26,17 +26,17 @@ class PBackgroundParent;
 // work in both the child and parent.
 already_AddRefed<nsIInputStream>
 DeserializeIPCStream(const IPCStream& aValue);
 
 already_AddRefed<nsIInputStream>
 DeserializeIPCStream(const OptionalIPCStream& aValue);
 
 // RAII helper class that serializes an nsIInputStream into an IPCStream struct.
-// Any file descriptor or PSendStream actors are automatically managed
+// Any file descriptor or PChildToParentStream actors are automatically managed
 // correctly.
 //
 // Here is a simple example:
 //
 //  // in ipdl file
 //  Protocol PMyStuff
 //  {
 //  parent:
@@ -55,17 +55,17 @@ DeserializeIPCStream(const OptionalIPCSt
 //
 //  // in parent c++ code
 //  bool
 //  MyStuffParent::RecvDoStuff(const IPCStream& aIPCStream) {
 //    nsCOMPtr<nsIInputStream> stream = DeserializeIPCStream(aIPCStream);
 //    // Do something with stream...
 //
 //    // You can also serialize streams from parent-to-child as long as
-//    // they don't require PSendStream actor support.
+//    // they don't require PChildToParentStream actor support.
 //    AutoIPCStream anotherStream;
 //    anotherStream.Serialize(mFileStream, Manager());
 //    SendStuffDone(anotherStream.TakeValue());
 //  }
 //
 // The AutoIPCStream RAII class may also be used if your stream is embedded
 // in a more complex IPDL structure.  In this case you attach the AutoIPCStream
 // to the embedded IPCStream and call TakeValue() after you pass the structure.
@@ -102,18 +102,18 @@ DeserializeIPCStream(const OptionalIPCSt
 //  }
 //
 // The AutoIPCStream class also supports OptionalIPCStream values.  As long as
 // you did not initialize the object with a non-optional IPCStream, you can call
 // TakeOptionalValue() instead.
 //
 // The AutoIPCStream class can also be used to serialize nsIInputStream objects
 // on the parent side to send to the child.  Currently, however, this only
-// works for directly serializable stream types.  The PSendStream actor mechanism
-// is not supported in this direction yet.
+// works for directly serializable stream types.  The PChildToParentStream actor
+// mechanism is not supported in this direction yet.
 //
 // Like SerializeInputStream(), the AutoIPCStream will crash if
 // serialization cannot be completed.
 //
 // NOTE: This is not a MOZ_STACK_CLASS so that it can be more easily integrated
 //       with complex ipdl structures.  For example, you may want to create an
 //       array of RAII AutoIPCStream objects or build your own wrapping
 //       RAII object to handle other actors that need to be cleaned up.
@@ -150,22 +150,22 @@ public:
   Serialize(nsIInputStream* aStream, dom::nsIContentChild* aManager);
 
   // Serialize the input stream or create a SendStream actor using the
   // PBackground manager.  If neither of these succeed, then crash.  This can
   // be called on the main thread or Worker threads.
   void
   Serialize(nsIInputStream* aStream, PBackgroundChild* aManager);
 
-  // Serialize the input stream.  A PSendStream cannot be used when going
+  // Serialize the input stream.  A PChildToParentStream cannot be used when going
   // from parent-to-child.
   void
   Serialize(nsIInputStream* aStream, dom::PContentParent* aManager);
 
-  // Serialize the input stream.  A PSendStream cannot be used when going
+  // Serialize the input stream.  A PChildToParentStream cannot be used when going
   // from parent-to-child.
   void
   Serialize(nsIInputStream* aStream, PBackgroundParent* aManager);
 
   // Get the IPCStream as a non-optional value.  This will
   // assert if a stream has not been serialized or if it has already been taken.
   // This should only be called if the value is being, or has already been, sent
   // to the parent
--- a/ipc/glue/PBackground.ipdl
+++ b/ipc/glue/PBackground.ipdl
@@ -13,17 +13,17 @@ include protocol PCacheStorage;
 include protocol PCacheStreamControl;
 include protocol PFileDescriptorSet;
 include protocol PFileSystemRequest;
 include protocol PGamepadEventChannel;
 include protocol PGamepadTestChannel;
 include protocol PMessagePort;
 include protocol PCameras;
 include protocol PQuota;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 include protocol PServiceWorkerManager;
 include protocol PUDPSocket;
 include protocol PVsync;
 
 include DOMTypes;
 include PBackgroundSharedTypes;
 include PBackgroundIDBSharedTypes;
 include PFileSystemParams;
@@ -56,17 +56,17 @@ sync protocol PBackground
   manages PCacheStreamControl;
   manages PFileDescriptorSet;
   manages PFileSystemRequest;
   manages PGamepadEventChannel;
   manages PGamepadTestChannel;
   manages PMessagePort;
   manages PCameras;
   manages PQuota;
-  manages PSendStream;
+  manages PChildToParentStream;
   manages PServiceWorkerManager;
   manages PUDPSocket;
   manages PVsync;
 
 parent:
   // Only called at startup during mochitests to check the basic infrastructure.
   async PBackgroundTest(nsCString testArg);
 
@@ -87,17 +87,17 @@ parent:
   async PServiceWorkerManager();
 
   async ShutdownServiceWorkerRegistrar();
 
   async PCacheStorage(Namespace aNamespace, PrincipalInfo aPrincipalInfo);
 
   async PMessagePort(nsID uuid, nsID destinationUuid, uint32_t sequenceId);
 
-  async PSendStream();
+  async PChildToParentStream();
 
   async MessagePortForceClose(nsID uuid, nsID destinationUuid, uint32_t sequenceId);
 
   async PAsmJSCacheEntry(OpenMode openMode,
                          WriteParams write,
                          PrincipalInfo principalInfo);
 
   async PQuota();
rename from ipc/glue/PSendStream.ipdl
rename to ipc/glue/PChildToParentStream.ipdl
--- a/ipc/glue/PSendStream.ipdl
+++ b/ipc/glue/PChildToParentStream.ipdl
@@ -4,17 +4,17 @@
 
 include protocol PBackground;
 include protocol PContent;
 include protocol PContentBridge;
 
 namespace mozilla {
 namespace ipc {
 
-protocol PSendStream
+protocol PChildToParentStream
 {
   manager PBackground or PContent or PContentBridge;
 
 parent:
   async Buffer(nsCString aBuffer);
   async Close(nsresult aRv);
 
 child:
--- a/ipc/glue/SendStream.h
+++ b/ipc/glue/SendStream.h
@@ -3,18 +3,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_ipc_SendStream_h
 #define mozilla_ipc_SendStream_h
 
 #include "mozilla/AlreadyAddRefed.h"
-#include "mozilla/ipc/PSendStreamChild.h"
-#include "mozilla/ipc/PSendStreamParent.h"
+#include "mozilla/ipc/PChildToParentStreamChild.h"
+#include "mozilla/ipc/PChildToParentStreamParent.h"
 
 class nsIInputStream;
 class nsIAsyncInputStream;
 
 namespace mozilla {
 
 namespace dom {
 class nsIContentChild;
@@ -44,17 +44,17 @@ class PBackgroundChild;
 //  2) If the actor is never sent to the parent, then the child code must
 //     call SendStreamChild::StartDestroy() to avoid memory leaks.
 //  3) The SendStreamChild actor can only be used on threads that can be
 //     guaranteed to stay alive as long as the actor is alive.  Right now
 //     this limits SendStream to the main thread and Worker threads.
 //
 // In general you should probably use the AutoIPCStreamChild RAII class
 // defined in InputStreamUtils.h instead of using SendStreamChild directly.
-class SendStreamChild : public PSendStreamChild
+class SendStreamChild : public PChildToParentStreamChild
 {
 public:
   // Create a SendStreamChild using a PContent IPC manager on the
   // main thread.  This can return nullptr if the provided stream is
   // blocking.
   static SendStreamChild*
   Create(nsIAsyncInputStream* aInputStream, dom::nsIContentChild* aManager);
 
@@ -79,17 +79,17 @@ public:
 protected:
   virtual
   ~SendStreamChild() = 0;
 };
 
 // On the parent side, you must simply call TakeReader() upon receiving a
 // reference to the SendStreamParent actor.  You do not need to maintain a
 // reference to the actor itself.
-class SendStreamParent : public PSendStreamParent
+class SendStreamParent : public PChildToParentStreamParent
 {
 public:
   virtual already_AddRefed<nsIInputStream>
   TakeReader() = 0;
 
 protected:
   virtual
   ~SendStreamParent() = 0;
--- a/ipc/glue/SendStreamAlloc.h
+++ b/ipc/glue/SendStreamAlloc.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_ipc_SendStreamAlloc_h
 #define mozilla_ipc_SendStreamAlloc_h
 
 namespace mozilla {
 namespace ipc {
 
-class PSendStreamParent;
+class PChildToParentStreamParent;
 
-PSendStreamParent*
-AllocPSendStreamParent();
+PChildToParentStreamParent*
+AllocPChildToParentStreamParent();
 
 } // ipc namespace
 } // mozilla namespace
 
 #endif // mozilla_ipc_SendStreamAlloc_h
--- a/ipc/glue/SendStreamChild.cpp
+++ b/ipc/glue/SendStreamChild.cpp
@@ -40,17 +40,17 @@ public:
   void StartDestroy() override;
 
   bool
   AddAsWorkerHolder(dom::workers::WorkerPrivate* aWorkerPrivate);
 
 private:
   class Callback;
 
-  // PSendStreamChild methods
+  // PChildToParentStreamChild methods
   virtual void
   ActorDestroy(ActorDestroyReason aReason) override;
 
   virtual mozilla::ipc::IPCResult
   RecvRequestClose(const nsresult& aRv) override;
 
   // WorkerHolder methods
   virtual bool
@@ -369,17 +369,17 @@ SendStreamChild::Create(nsIAsyncInputStr
 
   // SendStreamChild reads in the current thread, so it is only supported
   // on non-blocking, async channels
   if (NS_WARN_IF(IsBlocking(aInputStream))) {
     return nullptr;
   }
 
   SendStreamChild* actor = new SendStreamChildImpl(aInputStream);
-  aManager->SendPSendStreamConstructor(actor);
+  aManager->SendPChildToParentStreamConstructor(actor);
 
   return actor;
 }
 
 // static
 SendStreamChild*
 SendStreamChild::Create(nsIAsyncInputStream* aInputStream,
                         PBackgroundChild* aManager)
@@ -406,24 +406,24 @@ SendStreamChild::Create(nsIAsyncInputStr
 
   SendStreamChildImpl* actor = new SendStreamChildImpl(aInputStream);
 
   if (workerPrivate && !actor->AddAsWorkerHolder(workerPrivate)) {
     delete actor;
     return nullptr;
   }
 
-  aManager->SendPSendStreamConstructor(actor);
+  aManager->SendPChildToParentStreamConstructor(actor);
   return actor;
 }
 
 SendStreamChild::~SendStreamChild()
 {
 }
 
 void
-DeallocPSendStreamChild(PSendStreamChild* aActor)
+DeallocPChildToParentStreamChild(PChildToParentStreamChild* aActor)
 {
   delete aActor;
 }
 
 } // namespace ipc
 } // namespace mozilla
--- a/ipc/glue/SendStreamParent.cpp
+++ b/ipc/glue/SendStreamParent.cpp
@@ -19,17 +19,17 @@ namespace {
 class SendStreamParentImpl final : public SendStreamParent
 {
 public:
   SendStreamParentImpl(nsIAsyncInputStream* aReader,
                         nsIAsyncOutputStream* aWriter);
   ~SendStreamParentImpl();
 
 private:
-  // PSendStreamParentImpl methods
+  // PChildToParentStreamParentImpl methods
   virtual void
   ActorDestroy(ActorDestroyReason aReason) override;
 
   // SendStreamparent methods
   already_AddRefed<nsIInputStream>
   TakeReader() override;
 
   virtual mozilla::ipc::IPCResult
@@ -97,18 +97,18 @@ SendStreamParentImpl::SendStreamParentIm
 }
 
 } // anonymous namespace
 
 SendStreamParent::~SendStreamParent()
 {
 }
 
-PSendStreamParent*
-AllocPSendStreamParent()
+PChildToParentStreamParent*
+AllocPChildToParentStreamParent()
 {
   // use async versions for both reader and writer even though we are
   // opening the writer as an infinite stream.  We want to be able to
   // use CloseWithStatus() to communicate errors through the pipe.
   nsCOMPtr<nsIAsyncInputStream> reader;
   nsCOMPtr<nsIAsyncOutputStream> writer;
 
   // Use an "infinite" pipe because we cannot apply back-pressure through
@@ -122,15 +122,15 @@ AllocPSendStreamParent()
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return nullptr;
   }
 
   return new SendStreamParentImpl(reader, writer);
 }
 
 void
-DeallocPSendStreamParent(PSendStreamParent* aActor)
+DeallocPChildToParentStreamParent(PChildToParentStreamParent* aActor)
 {
   delete aActor;
 }
 
 } // namespace ipc
 } // namespace mozilla
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -184,19 +184,19 @@ LOCAL_INCLUDES += [
 ]
 
 IPDL_SOURCES = [
     'InputStreamParams.ipdlh',
     'IPCStream.ipdlh',
     'PBackground.ipdl',
     'PBackgroundSharedTypes.ipdlh',
     'PBackgroundTest.ipdl',
+    'PChildToParentStream.ipdl',
     'PFileDescriptorSet.ipdl',
     'ProtocolTypes.ipdlh',
-    'PSendStream.ipdl',
     'URIParams.ipdlh',
 ]
 
 LOCAL_INCLUDES += [
     '/dom/ipc',
     '/toolkit/crashreporter',
     '/toolkit/xre',
     '/xpcom/threads',
--- a/netwerk/ipc/NeckoChannelParams.ipdlh
+++ b/netwerk/ipc/NeckoChannelParams.ipdlh
@@ -3,17 +3,17 @@
 
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PHttpChannel;
 include protocol PFTPChannel;
 include protocol PRtspChannel;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 include BlobTypes;
 include URIParams;
 include IPCStream;
 include PBackgroundSharedTypes;
 
 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
 using RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h";
--- a/netwerk/ipc/PNecko.ipdl
+++ b/netwerk/ipc/PNecko.ipdl
@@ -17,17 +17,17 @@ include protocol PTCPSocket;
 include protocol PTCPServerSocket;
 include protocol PUDPSocket;
 include protocol PDNSRequest;
 include protocol PChannelDiverter;
 include protocol PBlob; //FIXME: bug #792908
 include protocol PFileDescriptorSet;
 include protocol PDataChannel;
 include protocol PTransportProvider;
-include protocol PSendStream;
+include protocol PChildToParentStream;
 
 include protocol PRtspController;
 include protocol PRtspChannel;
 include URIParams;
 include NeckoChannelParams;
 include PBrowserOrId;
 include protocol PAltDataOutputStream;
 
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -435,17 +435,17 @@ HttpChannelParent::DoAsyncOpen(  const U
   if (stream) {
     // FIXME: The fast path of using the existing stream currently only applies to streams
     //   that have had their entire contents serialized from the child at this point.
     //   Once bug 1294446 and bug 1294450 are fixed it is worth revisiting this heuristic.
     nsCOMPtr<nsIIPCSerializableInputStream> completeStream = do_QueryInterface(stream);
     if (!completeStream) {
       delayAsyncOpen = true;
 
-      // buffer size matches PSendStream transfer size.
+      // buffer size matches PChildToParentStream transfer size.
       const uint32_t kBufferSize = 32768;
 
       nsCOMPtr<nsIStorageStream> storageStream;
       nsresult rv = NS_NewStorageStream(kBufferSize, UINT32_MAX,
                                         getter_AddRefs(storageStream));
       if (NS_WARN_IF(NS_FAILED(rv))) {
         return SendFailedAsyncOpen(rv);
       }
--- a/netwerk/protocol/websocket/PWebSocket.ipdl
+++ b/netwerk/protocol/websocket/PWebSocket.ipdl
@@ -9,17 +9,17 @@ include protocol PNecko;
 include protocol PBrowser;
 include protocol PTransportProvider;
 include IPCStream;
 include URIParams;
 include NeckoChannelParams;
 
 include protocol PBlob; //FIXME: bug #792908
 include protocol PFileDescriptorSet; //FIXME: bug #792908
-include protocol PSendStream; //FIXME: bug #792908
+include protocol PChildToParentStream; //FIXME: bug #792908
 
 using class IPC::SerializedLoadContext from "SerializedLoadContext.h";
 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
 
 namespace mozilla {
 namespace net {
 
 union OptionalTransportProvider