Bug 1268151: Clean up some dependencies in IPDL headers; r=billm
authorAaron Klotz <aklotz@mozilla.com>
Tue, 17 May 2016 16:01:25 -0600
changeset 305185 ef57886bcaa6ba1423c1ca65f12b38ffb23d6ef8
parent 305184 06bec0a41dace985d31e09737374a8692c08927b
child 305186 4b1f7a028b0edd2901b77725e3dc7d3807af86f8
push id79518
push usercbook@mozilla.com
push dateSun, 17 Jul 2016 08:09:59 +0000
treeherdermozilla-inbound@711963e8daa3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1268151
milestone50.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 1268151: Clean up some dependencies in IPDL headers; r=billm MozReview-Commit-ID: n0FkC1zcay
dom/cache/CacheStreamControlChild.cpp
dom/cache/CacheStreamControlParent.cpp
dom/indexedDB/PBackgroundIDBSharedTypes.ipdlh
dom/ipc/Blob.cpp
dom/ipc/BlobTypes.ipdlh
dom/ipc/DOMTypes.ipdlh
dom/ipc/PBlob.ipdl
dom/ipc/PBlobStream.ipdl
dom/ipc/moz.build
ipc/glue/IPCStream.ipdlh
ipc/glue/InputStreamParams.ipdlh
ipc/glue/PBackground.ipdl
ipc/glue/ProtocolTypes.ipdlh
netwerk/ipc/NeckoChannelParams.ipdlh
--- a/dom/cache/CacheStreamControlChild.cpp
+++ b/dom/cache/CacheStreamControlChild.cpp
@@ -15,20 +15,20 @@
 #include "mozilla/ipc/PBackgroundChild.h"
 #include "mozilla/ipc/PFileDescriptorSetChild.h"
 #include "nsISupportsImpl.h"
 
 namespace mozilla {
 namespace dom {
 namespace cache {
 
+using mozilla::dom::OptionalFileDescriptorSet;
 using mozilla::ipc::AutoIPCStream;
 using mozilla::ipc::FileDescriptor;
 using mozilla::ipc::FileDescriptorSetChild;
-using mozilla::ipc::OptionalFileDescriptorSet;
 using mozilla::ipc::PFileDescriptorSetChild;
 
 // declared in ActorUtils.h
 PCacheStreamControlChild*
 AllocPCacheStreamControlChild()
 {
   return new CacheStreamControlChild();
 }
--- a/dom/cache/CacheStreamControlParent.cpp
+++ b/dom/cache/CacheStreamControlParent.cpp
@@ -15,19 +15,19 @@
 #include "mozilla/ipc/PBackgroundParent.h"
 #include "mozilla/ipc/PFileDescriptorSetParent.h"
 #include "nsISupportsImpl.h"
 
 namespace mozilla {
 namespace dom {
 namespace cache {
 
+using mozilla::dom::OptionalFileDescriptorSet;
 using mozilla::ipc::FileDescriptor;
 using mozilla::ipc::FileDescriptorSetParent;
-using mozilla::ipc::OptionalFileDescriptorSet;
 using mozilla::ipc::PFileDescriptorSetParent;
 
 // declared in ActorUtils.h
 void
 DeallocPCacheStreamControlParent(PCacheStreamControlParent* aActor)
 {
   delete aActor;
 }
--- a/dom/indexedDB/PBackgroundIDBSharedTypes.ipdlh
+++ b/dom/indexedDB/PBackgroundIDBSharedTypes.ipdlh
@@ -2,16 +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 PBackgroundIDBDatabaseFile;
 include protocol PBackgroundMutableFile;
 include protocol PBlob;
 
 include DOMTypes;
+include ProtocolTypes;
 
 include "mozilla/dom/indexedDB/SerializationHelpers.h";
 include "mozilla/dom/quota/SerializationHelpers.h";
 
 using struct mozilla::null_t
   from "ipc/IPCMessageUtils.h";
 
 using struct mozilla::void_t
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -561,17 +561,17 @@ private:
   Recv__delete__(const InputStreamParams& aParams,
                  const OptionalFileDescriptorSet& aFDs) override;
 };
 
 class InputStreamParent final
   : public PBlobStreamParent
 {
   typedef mozilla::ipc::InputStreamParams InputStreamParams;
-  typedef mozilla::ipc::OptionalFileDescriptorSet OptionalFileDescriptorSet;
+  typedef mozilla::dom::OptionalFileDescriptorSet OptionalFileDescriptorSet;
 
   bool* mSyncLoopGuard;
   InputStreamParams* mParams;
   OptionalFileDescriptorSet* mFDs;
 
 #ifdef DEBUG
   PRThread* mOwningThread;
 #endif
new file mode 100644
--- /dev/null
+++ b/dom/ipc/BlobTypes.ipdlh
@@ -0,0 +1,21 @@
+/* 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 PFileDescriptorSet;
+
+using struct mozilla::void_t
+  from "ipc/IPCMessageUtils.h";
+
+namespace mozilla {
+namespace dom {
+
+union OptionalFileDescriptorSet
+{
+  PFileDescriptorSet;
+  FileDescriptor[];
+  void_t;
+};
+
+}
+}
--- a/dom/ipc/DOMTypes.ipdlh
+++ b/dom/ipc/DOMTypes.ipdlh
@@ -1,25 +1,23 @@
 /* -*- 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 ProtocolTypes;
 
 using struct mozilla::void_t
   from "ipc/IPCMessageUtils.h";
 
 using struct mozilla::SerializedStructuredCloneBuffer
   from "ipc/IPCMessageUtils.h";
 
-using struct nsID
-  from "nsID.h";
-
 namespace mozilla {
 namespace dom {
 
 union OptionalID
 {
   nsID;
   void_t;
 };
--- a/dom/ipc/PBlob.ipdl
+++ b/dom/ipc/PBlob.ipdl
@@ -3,16 +3,17 @@
  * 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 BlobTypes;
 include DOMTypes;
 include InputStreamParams;
 
 namespace mozilla {
 namespace dom {
 
 union ResolveMysteryParams
 {
--- a/dom/ipc/PBlobStream.ipdl
+++ b/dom/ipc/PBlobStream.ipdl
@@ -1,14 +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 PBlob;
 include protocol PFileDescriptorSet;
+include BlobTypes;
 include InputStreamParams;
 
 namespace mozilla {
 namespace dom {
 
 protocol PBlobStream
 {
   manager PBlob;
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -85,16 +85,17 @@ UNIFIED_SOURCES += [
 SOURCES += [
     'Blob.cpp',
     'ContentChild.cpp',
     'CrashReporterChild.cpp',
     'ProcessHangMonitor.cpp',
 ]
 
 IPDL_SOURCES += [
+    'BlobTypes.ipdlh',
     'DOMTypes.ipdlh',
     'PBlob.ipdl',
     'PBlobStream.ipdl',
     'PBrowser.ipdl',
     'PBrowserOrId.ipdlh',
     'PColorPicker.ipdl',
     'PContent.ipdl',
     'PContentBridge.ipdl',
--- a/ipc/glue/IPCStream.ipdlh
+++ b/ipc/glue/IPCStream.ipdlh
@@ -1,13 +1,14 @@
 /* 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 BlobTypes;
 include InputStreamParams;
 
 namespace mozilla {
 namespace ipc {
 
 // Do not use this directly.  See IPCStream below.
 struct InputStreamParamsWithFds
 {
--- a/ipc/glue/InputStreamParams.ipdlh
+++ b/ipc/glue/InputStreamParams.ipdlh
@@ -1,16 +1,14 @@
 /* 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 PFileDescriptorSet;
-
-include DOMTypes;
+include ProtocolTypes;
 
 using struct mozilla::void_t
   from "ipc/IPCMessageUtils.h";
 
 namespace mozilla {
 namespace ipc {
 
 struct StringInputStreamParams
@@ -81,17 +79,10 @@ struct MIMEInputStreamParams
 {
   OptionalInputStreamParams optionalStream;
   nsCString headers;
   nsCString contentLength;
   bool startedReading;
   bool addContentLength;
 };
 
-union OptionalFileDescriptorSet
-{
-  PFileDescriptorSet;
-  FileDescriptor[];
-  void_t;
-};
-
 } // namespace ipc
 } // namespace mozilla
--- a/ipc/glue/PBackground.ipdl
+++ b/ipc/glue/PBackground.ipdl
@@ -23,16 +23,17 @@ include protocol PSendStream;
 include protocol PServiceWorkerManager;
 include protocol PUDPSocket;
 include protocol PVsync;
 
 include DOMTypes;
 include PBackgroundSharedTypes;
 include PBackgroundIDBSharedTypes;
 include PFileSystemParams;
+include ProtocolTypes;
 
 include "mozilla/dom/cache/IPCUtils.h";
 
 using mozilla::dom::cache::Namespace
   from "mozilla/dom/cache/Types.h";
 
 using mozilla::dom::asmjscache::OpenMode
   from "mozilla/dom/asmjscache/AsmJSCache.h";
--- a/ipc/glue/ProtocolTypes.ipdlh
+++ b/ipc/glue/ProtocolTypes.ipdlh
@@ -1,14 +1,17 @@
 /* -*- Mode: C++; c-basic-offset: 4; 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/. */
 
+using struct nsID
+  from "nsID.h";
+
 namespace mozilla {
 namespace ipc {
 
 struct ProtocolFdMapping
 {
     uint32_t protocolId;
     FileDescriptor fd;
 };
--- a/netwerk/ipc/NeckoChannelParams.ipdlh
+++ b/netwerk/ipc/NeckoChannelParams.ipdlh
@@ -3,16 +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 BlobTypes;
 include URIParams;
 include InputStreamParams;
 include PBackgroundSharedTypes;
 
 using mozilla::NeckoOriginAttributes from "mozilla/ipc/BackgroundUtils.h";
 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
 using RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h";
 using struct nsHttpAtom from "nsHttp.h";