Bug 1522596 - Remove nsIIPCSerializableURI and move its only member to nsIURI; r=valentin
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 25 Jan 2019 13:32:36 +0000
changeset 455442 d815471fff914f9482658278838592eaa62052b0
parent 455441 f57d14800cbb5cf9f7c135d7e32ea5728fe7b377
child 455443 1ba76553a3bd9ce2aefc64ebd8ed95b80225353a
push id35437
push userccoroiu@mozilla.com
push dateFri, 25 Jan 2019 21:48:48 +0000
treeherdermozilla-central@88a48f21fa68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1522596
milestone66.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 1522596 - Remove nsIIPCSerializableURI and move its only member to nsIURI; r=valentin Differential Revision: https://phabricator.services.mozilla.com/D17531
caps/NullPrincipalURI.cpp
caps/NullPrincipalURI.h
dom/file/uri/BlobURL.cpp
dom/file/uri/BlobURL.h
dom/jsurl/nsJSProtocolHandler.cpp
dom/jsurl/nsJSProtocolHandler.h
image/decoders/icon/nsIconURI.cpp
image/decoders/icon/nsIconURI.h
ipc/glue/URIUtils.cpp
ipc/glue/moz.build
ipc/glue/nsIIPCSerializableURI.h
modules/libjar/nsJARURI.cpp
modules/libjar/nsJARURI.h
netwerk/base/nsIURI.idl
netwerk/base/nsIURIMutator.idl
netwerk/base/nsSimpleNestedURI.cpp
netwerk/base/nsSimpleNestedURI.h
netwerk/base/nsSimpleURI.cpp
netwerk/base/nsSimpleURI.h
netwerk/base/nsStandardURL.cpp
netwerk/base/nsStandardURL.h
--- a/caps/NullPrincipalURI.cpp
+++ b/caps/NullPrincipalURI.cpp
@@ -61,17 +61,16 @@ NS_IMPL_RELEASE(NullPrincipalURI)
 
 NS_INTERFACE_MAP_BEGIN(NullPrincipalURI)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIURI)
   if (aIID.Equals(kNullPrincipalURIImplementationCID))
     foundInterface = static_cast<nsIURI*>(this);
   else
     NS_INTERFACE_MAP_ENTRY(nsIURI)
   NS_INTERFACE_MAP_ENTRY(nsISizeOf)
-  NS_INTERFACE_MAP_ENTRY(nsIIPCSerializableURI)
 NS_INTERFACE_MAP_END
 
 ////////////////////////////////////////////////////////////////////////////////
 //// nsIURI
 
 NS_IMETHODIMP
 NullPrincipalURI::GetAsciiHost(nsACString& _host) {
   _host.Truncate();
@@ -296,19 +295,16 @@ NullPrincipalURI::GetDisplayHost(nsACStr
   return GetHost(aUnicodeHost);
 }
 
 NS_IMETHODIMP
 NullPrincipalURI::GetDisplayPrePath(nsACString& aPrePath) {
   return GetPrePath(aPrePath);
 }
 
-////////////////////////////////////////////////////////////////////////////////
-//// nsIIPCSerializableURI
-
 void NullPrincipalURI::Serialize(mozilla::ipc::URIParams& aParams) {
   aParams = mozilla::ipc::NullPrincipalURIParams();
 }
 
 bool NullPrincipalURI::Deserialize(const mozilla::ipc::URIParams& aParams) {
   if (aParams.type() != mozilla::ipc::URIParams::TNullPrincipalURIParams) {
     MOZ_ASSERT_UNREACHABLE("unexpected URIParams type");
     return false;
--- a/caps/NullPrincipalURI.h
+++ b/caps/NullPrincipalURI.h
@@ -10,17 +10,16 @@
 
 #ifndef mozilla_NullPrincipalURI_h
 #define mozilla_NullPrincipalURI_h
 
 #include "nsIURI.h"
 #include "nsISizeOf.h"
 #include "nsString.h"
 #include "mozilla/Attributes.h"
-#include "nsIIPCSerializableURI.h"
 #include "mozilla/MemoryReporting.h"
 #include "NullPrincipal.h"
 #include "nsID.h"
 #include "nsIURIMutator.h"
 
 // {51fcd543-3b52-41f7-b91b-6b54102236e6}
 #define NS_NULLPRINCIPALURI_IMPLEMENTATION_CID       \
   {                                                  \
@@ -28,23 +27,20 @@
       0xb9, 0x1b, 0x6b, 0x54, 0x10, 0x22, 0x36, 0xe6 \
     }                                                \
   }
 
 namespace mozilla {
 
 class Encoding;
 
-class NullPrincipalURI final : public nsIURI,
-                               public nsISizeOf,
-                               public nsIIPCSerializableURI {
+class NullPrincipalURI final : public nsIURI, public nsISizeOf {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
-  NS_DECL_NSIIPCSERIALIZABLEURI
 
   // nsISizeOf
   virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
   virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
 
   // Returns null on failure.
   static already_AddRefed<NullPrincipalURI> Create();
 
--- a/dom/file/uri/BlobURL.cpp
+++ b/dom/file/uri/BlobURL.cpp
@@ -60,18 +60,18 @@ BlobURL::Write(nsIObjectOutputStream* aS
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = aStream->WriteBoolean(mRevoked);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
-// nsIIPCSerializableURI methods:
-void BlobURL::Serialize(mozilla::ipc::URIParams& aParams) {
+NS_IMETHODIMP_(void)
+BlobURL::Serialize(mozilla::ipc::URIParams& aParams) {
   using namespace mozilla::ipc;
 
   HostObjectURIParams hostParams;
   URIParams simpleParams;
 
   mozilla::net::nsSimpleURI::Serialize(simpleParams);
   hostParams.simpleParams() = simpleParams;
 
--- a/dom/file/uri/BlobURL.h
+++ b/dom/file/uri/BlobURL.h
@@ -6,42 +6,41 @@
 
 #ifndef mozilla_dom_BlobURL_h
 #define mozilla_dom_BlobURL_h
 
 #include "mozilla/Attributes.h"
 #include "nsCOMPtr.h"
 #include "nsISerializable.h"
 #include "nsSimpleURI.h"
-#include "nsIIPCSerializableURI.h"
 #include "prtime.h"
 
 namespace mozilla {
 namespace dom {
 
 /**
  * These URIs refer to host objects with "blob" scheme.
  */
 class BlobURL final : public mozilla::net::nsSimpleURI {
  private:
   BlobURL();
 
  public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSISERIALIZABLE
   NS_DECL_NSICLASSINFO
-  NS_DECL_NSIIPCSERIALIZABLEURI
 
   // Override CloneInternal() and EqualsInternal()
   virtual nsresult CloneInternal(RefHandlingEnum aRefHandlingMode,
                                  const nsACString& newRef,
                                  nsIURI** aClone) override;
   virtual nsresult EqualsInternal(nsIURI* aOther,
                                   RefHandlingEnum aRefHandlingMode,
                                   bool* aResult) override;
+  NS_IMETHOD_(void) Serialize(mozilla::ipc::URIParams& aParams) override;
 
   // Override StartClone to hand back a BlobURL
   virtual mozilla::net::nsSimpleURI* StartClone(
       RefHandlingEnum refHandlingMode, const nsACString& newRef) override {
     BlobURL* url = new BlobURL();
     SetRefOnClone(url, refHandlingMode, newRef);
     return url;
   }
--- a/dom/jsurl/nsJSProtocolHandler.cpp
+++ b/dom/jsurl/nsJSProtocolHandler.cpp
@@ -1222,18 +1222,17 @@ nsJSURI::Write(nsIObjectOutputStream* aS
   if (mBaseURI) {
     rv = aStream->WriteObject(mBaseURI, true);
     if (NS_FAILED(rv)) return rv;
   }
 
   return NS_OK;
 }
 
-// nsIIPCSerializableURI
-void nsJSURI::Serialize(mozilla::ipc::URIParams& aParams) {
+NS_IMETHODIMP_(void) nsJSURI::Serialize(mozilla::ipc::URIParams& aParams) {
   using namespace mozilla::ipc;
 
   JSURIParams jsParams;
   URIParams simpleParams;
 
   mozilla::net::nsSimpleURI::Serialize(simpleParams);
 
   jsParams.simpleParams() = simpleParams;
--- a/dom/jsurl/nsJSProtocolHandler.h
+++ b/dom/jsurl/nsJSProtocolHandler.h
@@ -71,24 +71,22 @@ class nsJSURI final : public mozilla::ne
   nsIURI* GetBaseURI() const { return mBaseURI; }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIURI overrides
   virtual mozilla::net::nsSimpleURI* StartClone(
       RefHandlingEnum refHandlingMode, const nsACString& newRef) override;
   NS_IMETHOD Mutate(nsIURIMutator** _retval) override;
+  NS_IMETHOD_(void) Serialize(mozilla::ipc::URIParams& aParams) override;
 
   // nsISerializable overrides
   NS_IMETHOD Read(nsIObjectInputStream* aStream) override;
   NS_IMETHOD Write(nsIObjectOutputStream* aStream) override;
 
-  // nsIIPCSerializableURI overrides
-  NS_DECL_NSIIPCSERIALIZABLEURI
-
   // Override the nsIClassInfo method GetClassIDNoAlloc to make sure our
   // nsISerializable impl works right.
   NS_IMETHOD GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) override;
   // NS_IMETHOD QueryInterface( const nsIID& aIID, void** aInstancePtr )
   // override;
 
  protected:
   nsJSURI() {}
--- a/image/decoders/icon/nsIconURI.cpp
+++ b/image/decoders/icon/nsIconURI.cpp
@@ -50,17 +50,16 @@ nsMozIconURI::~nsMozIconURI() {}
 
 NS_IMPL_ADDREF(nsMozIconURI)
 NS_IMPL_RELEASE(nsMozIconURI)
 
 NS_INTERFACE_MAP_BEGIN(nsMozIconURI)
   NS_INTERFACE_MAP_ENTRY(nsIMozIconURI)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIURI)
   NS_INTERFACE_MAP_ENTRY(nsIURI)
-  NS_INTERFACE_MAP_ENTRY(nsIIPCSerializableURI)
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsINestedURI, mIconURL)
 NS_INTERFACE_MAP_END
 
 #define MOZICON_SCHEME "moz-icon:"
 #define MOZICON_SCHEME_LEN (sizeof(MOZICON_SCHEME) - 1)
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsIURI methods:
@@ -536,18 +535,16 @@ NS_IMETHODIMP
 nsMozIconURI::GetIconState(nsACString& aState) {
   if (mIconState >= 0) {
     aState = kStateStrings[mIconState];
   } else {
     aState.Truncate();
   }
   return NS_OK;
 }
-////////////////////////////////////////////////////////////////////////////////
-// nsIIPCSerializableURI methods:
 
 void nsMozIconURI::Serialize(URIParams& aParams) {
   IconURIParams params;
 
   if (mIconURL) {
     URIParams iconURLParams;
     SerializeURI(mIconURL, iconURLParams);
     if (iconURLParams.type() == URIParams::T__None) {
--- a/image/decoders/icon/nsIconURI.h
+++ b/image/decoders/icon/nsIconURI.h
@@ -5,32 +5,28 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_image_decoders_icon_nsIconURI_h
 #define mozilla_image_decoders_icon_nsIconURI_h
 
 #include "nsIIconURI.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
-#include "nsIIPCSerializableURI.h"
 #include "nsINestedURI.h"
 #include "nsIURIMutator.h"
 
 namespace mozilla {
 class Encoding;
 }
 
-class nsMozIconURI final : public nsIMozIconURI,
-                           public nsIIPCSerializableURI,
-                           public nsINestedURI {
+class nsMozIconURI final : public nsIMozIconURI, public nsINestedURI {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSIMOZICONURI
-  NS_DECL_NSIIPCSERIALIZABLEURI
   NS_DECL_NSINESTEDURI
 
  protected:
   nsMozIconURI();
   virtual ~nsMozIconURI();
   nsCOMPtr<nsIURL> mIconURL;  // a URL that we want the icon for
   uint32_t mSize;  // the # of pixels in a row that we want for this image.
                    // Typically 16, 32, 128, etc.
--- a/ipc/glue/URIUtils.cpp
+++ b/ipc/glue/URIUtils.cpp
@@ -1,18 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "URIUtils.h"
 
-#include "nsIIPCSerializableURI.h"
-
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/dom/BlobURL.h"
 #include "mozilla/NullPrincipalURI.h"
 #include "nsComponentManagerUtils.h"
 #include "nsDebug.h"
 #include "nsID.h"
 #include "nsJARURI.h"
@@ -37,22 +35,17 @@ NS_DEFINE_CID(kIconURIMutatorCID, NS_MOZ
 
 namespace mozilla {
 namespace ipc {
 
 void SerializeURI(nsIURI* aURI, URIParams& aParams) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aURI);
 
-  nsCOMPtr<nsIIPCSerializableURI> serializable = do_QueryInterface(aURI);
-  if (!serializable) {
-    MOZ_CRASH("All IPDL URIs must be serializable!");
-  }
-
-  serializable->Serialize(aParams);
+  aURI->Serialize(aParams);
   if (aParams.type() == URIParams::T__None) {
     MOZ_CRASH("Serialize failed!");
   }
 }
 
 void SerializeURI(nsIURI* aURI, OptionalURIParams& aParams) {
   MOZ_ASSERT(NS_IsMainThread());
 
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -2,17 +2,16 @@
 # vim: set filetype=python:
 # 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('/media/webrtc/webrtc.mozbuild')
 
 EXPORTS += [
     'nsIIPCSerializableInputStream.h',
-    'nsIIPCSerializableURI.h',
 ]
 
 EXPORTS.mozilla.ipc += [
     'BackgroundChild.h',
     'BackgroundParent.h',
     'BackgroundUtils.h',
     'BrowserProcessSubThread.h',
     'ByteBuf.h',
deleted file mode 100644
--- a/ipc/glue/nsIIPCSerializableURI.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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_nsIIPCSerializableURI_h
-#define mozilla_ipc_nsIIPCSerializableURI_h
-
-#include "nsISupports.h"
-#include "mozilla/Attributes.h"
-
-namespace mozilla {
-namespace ipc {
-class URIParams;
-}  // namespace ipc
-}  // namespace mozilla
-
-#define NS_IIPCSERIALIZABLEURI_IID                  \
-  {                                                 \
-    0xfee3437d, 0x3daf, 0x411f, {                   \
-      0xb0, 0x1d, 0xdc, 0xd4, 0x88, 0x55, 0xe3, 0xd \
-    }                                               \
-  }
-
-class NS_NO_VTABLE nsIIPCSerializableURI : public nsISupports {
- public:
-  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIPCSERIALIZABLEURI_IID)
-
-  virtual void Serialize(mozilla::ipc::URIParams& aParams) = 0;
-
-  // For deserialization, see nsIURIMutator
-};
-
-NS_DEFINE_STATIC_IID_ACCESSOR(nsIIPCSerializableURI, NS_IIPCSERIALIZABLEURI_IID)
-
-#define NS_DECL_NSIIPCSERIALIZABLEURI \
-  virtual void Serialize(mozilla::ipc::URIParams&) override;
-
-#define NS_FORWARD_NSIIPCSERIALIZABLEURI(_to)                         \
-  virtual void Serialize(mozilla::ipc::URIParams& aParams) override { \
-    _to Serialize(aParams);                                           \
-  }
-
-#define NS_FORWARD_SAFE_NSIIPCSERIALIZABLEURI(_to)                    \
-  virtual void Serialize(mozilla::ipc::URIParams& aParams) override { \
-    if (_to) {                                                        \
-      _to->Serialize(aParams);                                        \
-    }                                                                 \
-  }
-
-#endif  // mozilla_ipc_nsIIPCSerializableURI_h
--- a/modules/libjar/nsJARURI.cpp
+++ b/modules/libjar/nsJARURI.cpp
@@ -38,17 +38,16 @@ NS_IMPL_RELEASE(nsJARURI)
 NS_INTERFACE_MAP_BEGIN(nsJARURI)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIJARURI)
   NS_INTERFACE_MAP_ENTRY(nsIURI)
   NS_INTERFACE_MAP_ENTRY(nsIURL)
   NS_INTERFACE_MAP_ENTRY(nsIJARURI)
   NS_INTERFACE_MAP_ENTRY(nsISerializable)
   NS_INTERFACE_MAP_ENTRY(nsIClassInfo)
   NS_INTERFACE_MAP_ENTRY(nsINestedURI)
-  NS_INTERFACE_MAP_ENTRY(nsIIPCSerializableURI)
   NS_INTERFACE_MAP_ENTRY_CONCRETE(nsJARURI)
 NS_INTERFACE_MAP_END
 
 nsresult nsJARURI::Init(const char *charsetHint) {
   mCharsetHint = charsetHint;
   return NS_OK;
 }
 
@@ -761,19 +760,16 @@ nsJARURI::GetInnerURI(nsIURI **aURI) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsJARURI::GetInnermostURI(nsIURI **uri) {
   return NS_ImplGetInnermostURI(this, uri);
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// nsIIPCSerializableURI methods:
-
 void nsJARURI::Serialize(URIParams &aParams) {
   JARURIParams params;
 
   SerializeURI(mJARFile, params.jarFile());
   SerializeURI(mJAREntry, params.jarEntry());
   params.charset() = mCharsetHint;
 
   aParams = params;
--- a/modules/libjar/nsJARURI.h
+++ b/modules/libjar/nsJARURI.h
@@ -8,17 +8,16 @@
 #define nsJARURI_h__
 
 #include "nsIJARURI.h"
 #include "nsISerializable.h"
 #include "nsIClassInfo.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsINestedURI.h"
-#include "nsIIPCSerializableURI.h"
 #include "nsIURIMutator.h"
 
 #define NS_THIS_JARURI_IMPL_CID                      \
   { /* 9a55f629-730b-4d08-b75b-fa7d9570a691 */       \
     0x9a55f629, 0x730b, 0x4d08, {                    \
       0xb7, 0x5b, 0xfa, 0x7d, 0x95, 0x70, 0xa6, 0x91 \
     }                                                \
   }
@@ -35,27 +34,25 @@
     0x19d9161b, 0xa2a9, 0x4518, {                    \
       0xb2, 0xc9, 0xfc, 0xb8, 0x29, 0x6d, 0x6d, 0xcd \
     }                                                \
   }
 
 class nsJARURI final : public nsIJARURI,
                        public nsISerializable,
                        public nsIClassInfo,
-                       public nsINestedURI,
-                       public nsIIPCSerializableURI {
+                       public nsINestedURI {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSIURL
   NS_DECL_NSIJARURI
   NS_DECL_NSISERIALIZABLE
   NS_DECL_NSICLASSINFO
   NS_DECL_NSINESTEDURI
-  NS_DECL_NSIIPCSERIALIZABLEURI
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_THIS_JARURI_IMPL_CID)
 
   // nsJARURI
   nsresult FormatSpec(const nsACString &entryPath, nsACString &result,
                       bool aIncludeScheme = true);
   nsresult CreateEntryURL(const nsACString &entryFilename, const char *charset,
                           nsIURL **url);
--- a/netwerk/base/nsIURI.idl
+++ b/netwerk/base/nsIURI.idl
@@ -39,20 +39,24 @@
 %{C++
 #include "nsString.h"
 
 #undef GetPort  // XXX Windows!
 #undef SetPort  // XXX Windows!
 
 namespace mozilla {
 class Encoding;
-}
+namespace ipc {
+class URIParams;
+}  // namespace ipc
+}  // namespace mozilla
 %}
 
 [ptr] native Encoding(const mozilla::Encoding);
+[ref] native URIParams(mozilla::ipc::URIParams);
 interface nsIURIMutator;
 
 /**
  * nsIURI - interface for an uniform resource identifier w/ i18n support.
  *
  * AUTF8String attributes may contain unescaped UTF-8 characters.
  * Consumers should be careful to escape the UTF-8 strings as necessary, but
  * should always try to "display" the UTF-8 version as provided by this
@@ -307,9 +311,15 @@ interface nsIURI : nsISupports
 
     /**
      * Returns an nsIURIMutator that can be used to make changes to the URI.
      * After performing the setter operations on the mutator, one may call
      * mutator.finalize() to get a new immutable URI with the desired
      * properties.
      */
     nsIURIMutator mutate();
+
+    /**
+     * Serializes a URI object to a URIParams data structure in order for being
+     * passed over IPC.  For deserialization, see nsIURIMutator.
+     */
+    [noscript, notxpcom] void serialize(in URIParams aParams);
 };
--- a/netwerk/base/nsIURIMutator.idl
+++ b/netwerk/base/nsIURIMutator.idl
@@ -281,17 +281,17 @@ interface nsIURISetters : nsIURISetSpec
 
 %}
 
 [scriptable, builtinclass, uuid(4d1f3103-1c44-4dcd-b717-5d22a697a7d9)]
 interface nsIURIMutator : nsIURISetters
 {
   /**
    * Initalizes the URI by reading IPC URIParams.
-   * See nsIIPCSerializableURI.
+   * See nsIURI.
    */
   [noscript, notxpcom, must_use]
   nsresult deserialize(in const_URIParams_ref aParams);
 
   /**
    * Finishes changing or constructing the URI and returns an immutable URI.
    */
   [must_use]
--- a/netwerk/base/nsSimpleNestedURI.cpp
+++ b/netwerk/base/nsSimpleNestedURI.cpp
@@ -94,18 +94,18 @@ nsSimpleNestedURI::Write(nsIObjectOutput
 
   nsresult rv = nsSimpleURI::Write(aStream);
   if (NS_FAILED(rv)) return rv;
 
   rv = aStream->WriteCompoundObject(mInnerURI, NS_GET_IID(nsIURI), true);
   return rv;
 }
 
-// nsIIPCSerializableURI
-void nsSimpleNestedURI::Serialize(mozilla::ipc::URIParams& aParams) {
+NS_IMETHODIMP_(void)
+nsSimpleNestedURI::Serialize(mozilla::ipc::URIParams& aParams) {
   using namespace mozilla::ipc;
 
   SimpleNestedURIParams params;
   URIParams simpleParams;
 
   nsSimpleURI::Serialize(simpleParams);
   params.simpleParams() = simpleParams;
 
--- a/netwerk/base/nsSimpleNestedURI.h
+++ b/netwerk/base/nsSimpleNestedURI.h
@@ -12,18 +12,16 @@
 #ifndef nsSimpleNestedURI_h__
 #define nsSimpleNestedURI_h__
 
 #include "nsCOMPtr.h"
 #include "nsSimpleURI.h"
 #include "nsINestedURI.h"
 #include "nsIURIMutator.h"
 
-#include "nsIIPCSerializableURI.h"
-
 namespace mozilla {
 namespace net {
 
 class nsSimpleNestedURI : public nsSimpleURI, public nsINestedURI {
  protected:
   nsSimpleNestedURI() = default;
   explicit nsSimpleNestedURI(nsIURI* innerURI);
 
@@ -37,24 +35,22 @@ class nsSimpleNestedURI : public nsSimpl
 
   // nsSimpleURI overrides
   virtual nsresult EqualsInternal(nsIURI* other,
                                   RefHandlingEnum refHandlingMode,
                                   bool* result) override;
   virtual nsSimpleURI* StartClone(RefHandlingEnum refHandlingMode,
                                   const nsACString& newRef) override;
   NS_IMETHOD Mutate(nsIURIMutator** _retval) override;
+  NS_IMETHOD_(void) Serialize(ipc::URIParams& aParams) override;
 
   // nsISerializable overrides
   NS_IMETHOD Read(nsIObjectInputStream* aStream) override;
   NS_IMETHOD Write(nsIObjectOutputStream* aStream) override;
 
-  // nsIIPCSerializableURI overrides
-  NS_DECL_NSIIPCSERIALIZABLEURI
-
   // Override the nsIClassInfo method GetClassIDNoAlloc to make sure our
   // nsISerializable impl works right.
   NS_IMETHOD GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) override;
 
  protected:
   nsCOMPtr<nsIURI> mInnerURI;
 
   nsresult SetPathQueryRef(const nsACString& aPathQueryRef) override;
--- a/netwerk/base/nsSimpleURI.cpp
+++ b/netwerk/base/nsSimpleURI.cpp
@@ -13,17 +13,16 @@
 #include "nsString.h"
 #include "plstr.h"
 #include "nsURLHelper.h"
 #include "nsNetCID.h"
 #include "nsIObjectInputStream.h"
 #include "nsIObjectOutputStream.h"
 #include "nsEscape.h"
 #include "nsError.h"
-#include "nsIIPCSerializableURI.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/ipc/URIUtils.h"
 #include "nsIURIMutator.h"
 
 using namespace mozilla::ipc;
 
 namespace mozilla {
 namespace net {
@@ -46,18 +45,17 @@ static NS_DEFINE_CID(kSimpleURICID, NS_S
 ////////////////////////////////////////////////////////////////////////////////
 // nsSimpleURI methods:
 
 nsSimpleURI::nsSimpleURI() : mIsRefValid(false), mIsQueryValid(false) {}
 
 NS_IMPL_ADDREF(nsSimpleURI)
 NS_IMPL_RELEASE(nsSimpleURI)
 NS_INTERFACE_TABLE_HEAD(nsSimpleURI)
-  NS_INTERFACE_TABLE(nsSimpleURI, nsIURI, nsISerializable, nsIClassInfo,
-                     nsIIPCSerializableURI)
+  NS_INTERFACE_TABLE(nsSimpleURI, nsIURI, nsISerializable, nsIClassInfo)
   NS_INTERFACE_TABLE_TO_MAP_SEGUE
   if (aIID.Equals(kThisSimpleURIImplementationCID))
     foundInterface = static_cast<nsIURI *>(this);
   else
     NS_INTERFACE_MAP_ENTRY(nsISizeOf)
 NS_INTERFACE_MAP_END
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -137,19 +135,16 @@ nsSimpleURI::Write(nsIObjectOutputStream
   if (mIsQueryValid) {
     rv = aStream->WriteStringZ(mQuery.get());
     if (NS_FAILED(rv)) return rv;
   }
 
   return NS_OK;
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// nsIIPCSerializableURI methods:
-
 void nsSimpleURI::Serialize(URIParams &aParams) {
   SimpleURIParams params;
 
   params.scheme() = mScheme;
   params.path() = mPath;
 
   if (mIsRefValid) {
     params.ref() = mRef;
--- a/netwerk/base/nsSimpleURI.h
+++ b/netwerk/base/nsSimpleURI.h
@@ -7,44 +7,41 @@
 #define nsSimpleURI_h__
 
 #include "mozilla/MemoryReporting.h"
 #include "nsIURI.h"
 #include "nsISerializable.h"
 #include "nsString.h"
 #include "nsIClassInfo.h"
 #include "nsISizeOf.h"
-#include "nsIIPCSerializableURI.h"
 #include "nsIURIMutator.h"
 
 namespace mozilla {
 namespace net {
 
 #define NS_THIS_SIMPLEURI_IMPLEMENTATION_CID         \
   { /* 0b9bb0c2-fee6-470b-b9b9-9fd9462b5e19 */       \
     0x0b9bb0c2, 0xfee6, 0x470b, {                    \
       0xb9, 0xb9, 0x9f, 0xd9, 0x46, 0x2b, 0x5e, 0x19 \
     }                                                \
   }
 
 class nsSimpleURI : public nsIURI,
                     public nsISerializable,
                     public nsIClassInfo,
-                    public nsISizeOf,
-                    public nsIIPCSerializableURI {
+                    public nsISizeOf {
  protected:
   nsSimpleURI();
   virtual ~nsSimpleURI() = default;
 
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSISERIALIZABLE
   NS_DECL_NSICLASSINFO
-  NS_DECL_NSIIPCSERIALIZABLEURI
 
   static already_AddRefed<nsSimpleURI> From(nsIURI *aURI);
 
   // nsSimpleURI methods:
 
   bool Equals(nsSimpleURI *aOther) { return EqualsInternal(aOther, eHonorRef); }
 
   // nsISizeOf
--- a/netwerk/base/nsStandardURL.cpp
+++ b/netwerk/base/nsStandardURL.cpp
@@ -1183,17 +1183,16 @@ NS_IMPL_RELEASE(nsStandardURL)
 NS_INTERFACE_MAP_BEGIN(nsStandardURL)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStandardURL)
   NS_INTERFACE_MAP_ENTRY(nsIURI)
   NS_INTERFACE_MAP_ENTRY(nsIURL)
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIFileURL, mSupportsFileURL)
   NS_INTERFACE_MAP_ENTRY(nsIStandardURL)
   NS_INTERFACE_MAP_ENTRY(nsISerializable)
   NS_INTERFACE_MAP_ENTRY(nsIClassInfo)
-  NS_INTERFACE_MAP_ENTRY(nsIIPCSerializableURI)
   NS_INTERFACE_MAP_ENTRY(nsISensitiveInfoHiddenURI)
   // see nsStandardURL::Equals
   if (aIID.Equals(kThisImplCID))
     foundInterface = static_cast<nsIURI *>(this);
   else
     NS_INTERFACE_MAP_ENTRY(nsISizeOf)
 NS_INTERFACE_MAP_END
 
@@ -3305,20 +3304,16 @@ nsStandardURL::Write(nsIObjectOutputStre
   rv = stream->WriteBoolean(mSupportsFileURL);
   if (NS_FAILED(rv)) return rv;
 
   // mDisplayHost is just a cache that can be recovered as needed.
 
   return NS_OK;
 }
 
-//---------------------------------------------------------------------------
-// nsStandardURL::nsIIPCSerializableURI
-//---------------------------------------------------------------------------
-
 inline ipc::StandardURLSegment ToIPCSegment(
     const nsStandardURL::URLSegment &aSegment) {
   return ipc::StandardURLSegment(aSegment.mPos, aSegment.mLen);
 }
 
 inline MOZ_MUST_USE bool FromIPCSegment(const nsACString &aSpec,
                                         const ipc::StandardURLSegment &aSegment,
                                         nsStandardURL::URLSegment &aTarget) {
--- a/netwerk/base/nsStandardURL.h
+++ b/netwerk/base/nsStandardURL.h
@@ -14,17 +14,16 @@
 #include "nsIObserver.h"
 #include "nsCOMPtr.h"
 #include "nsURLHelper.h"
 #include "nsIClassInfo.h"
 #include "nsISizeOf.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/LinkedList.h"
 #include "mozilla/MemoryReporting.h"
-#include "nsIIPCSerializableURI.h"
 #include "nsISensitiveInfoHiddenURI.h"
 #include "nsIURIMutator.h"
 
 #ifdef NS_BUILD_REFCNT_LOGGING
 #  define DEBUG_DUMP_URLS_AT_SHUTDOWN
 #endif
 
 class nsIBinaryInputStream;
@@ -42,17 +41,16 @@ namespace net {
 // standard URL implementation
 //-----------------------------------------------------------------------------
 
 class nsStandardURL : public nsIFileURL,
                       public nsIStandardURL,
                       public nsISerializable,
                       public nsIClassInfo,
                       public nsISizeOf,
-                      public nsIIPCSerializableURI,
                       public nsISensitiveInfoHiddenURI
 #ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN
     ,
                       public LinkedListElement<nsStandardURL>
 #endif
 {
  protected:
   virtual ~nsStandardURL();
@@ -61,17 +59,16 @@ class nsStandardURL : public nsIFileURL,
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSIURL
   NS_DECL_NSIFILEURL
   NS_DECL_NSISTANDARDURL
   NS_DECL_NSISERIALIZABLE
   NS_DECL_NSICLASSINFO
-  NS_DECL_NSIIPCSERIALIZABLEURI
   NS_DECL_NSISENSITIVEINFOHIDDENURI
 
   // nsISizeOf
   virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
   virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
 
   static void InitGlobalObjects();
   static void ShutdownGlobalObjects();