Bug 1359718 - Get rid of PBlob - part 5 - Fixing #includes, r=smaug
☠☠ backed out by 9a5f624b597c ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 23 May 2017 18:06:52 +0200
changeset 360249 2a2c16255a2c378ec3601a2532d54391d1ee8c37
parent 360248 1b6c07b71ba41ce647058bea7417e4c0c32863d7
child 360250 e56d1ca34efdfa74841de76f92282ebecc105a0c
push id31872
push userryanvm@gmail.com
push dateTue, 23 May 2017 22:11:58 +0000
treeherdermozilla-central@96e18bec9fc8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1359718
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 1359718 - Get rid of PBlob - part 5 - Fixing #includes, r=smaug
dom/file/ipc/IPCBlobInputStream.cpp
dom/file/ipc/IPCBlobInputStream.h
dom/file/ipc/IPCBlobInputStreamChild.cpp
dom/file/ipc/IPCBlobInputStreamParent.cpp
--- a/dom/file/ipc/IPCBlobInputStream.cpp
+++ b/dom/file/ipc/IPCBlobInputStream.cpp
@@ -2,18 +2,18 @@
 /* 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 "IPCBlobInputStream.h"
 #include "IPCBlobInputStreamChild.h"
 #include "IPCBlobInputStreamStorage.h"
+#include "mozilla/ipc/InputStreamParams.h"
 #include "nsIAsyncInputStream.h"
-#include "mozilla/SystemGroup.h"
 
 namespace mozilla {
 namespace dom {
 
 namespace {
 
 class CallbackRunnable final : public CancelableRunnable
 {
@@ -345,17 +345,17 @@ IPCBlobInputStream::OnInputStreamReady(n
 }
 
 // nsIIPCSerializableInputStream
 
 void
 IPCBlobInputStream::Serialize(mozilla::ipc::InputStreamParams& aParams,
                               FileDescriptorArray& aFileDescriptors)
 {
-  IPCBlobInputStreamParams params;
+  mozilla::ipc::IPCBlobInputStreamParams params;
   params.id() = mActor->ID();
 
   aParams = params;
 }
 
 bool
 IPCBlobInputStream::Deserialize(const mozilla::ipc::InputStreamParams& aParams,
                                 const FileDescriptorArray& aFileDescriptors)
--- a/dom/file/ipc/IPCBlobInputStream.h
+++ b/dom/file/ipc/IPCBlobInputStream.h
@@ -7,16 +7,17 @@
 #ifndef mozilla_dom_ipc_IPCBlobInputStream_h
 #define mozilla_dom_ipc_IPCBlobInputStream_h
 
 #include "nsIAsyncInputStream.h"
 #include "nsICloneableInputStream.h"
 #include "nsIFileStreams.h"
 #include "nsIIPCSerializableInputStream.h"
 #include "nsISeekableStream.h"
+#include "nsCOMPtr.h"
 
 namespace mozilla {
 namespace dom {
 
 class IPCBlobInputStreamChild;
 
 class IPCBlobInputStream final : public nsIAsyncInputStream
                                , public nsIInputStreamCallback
--- a/dom/file/ipc/IPCBlobInputStreamChild.cpp
+++ b/dom/file/ipc/IPCBlobInputStreamChild.cpp
@@ -1,15 +1,17 @@
 /* -*- 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 "IPCBlobInputStreamChild.h"
+
+#include "mozilla/ipc/IPCStreamUtils.h"
 #include "WorkerHolder.h"
 
 namespace mozilla {
 namespace dom {
 
 namespace {
 
 // This runnable is used in case the last stream is forgotten on the 'wrong'
@@ -224,17 +226,17 @@ IPCBlobInputStreamChild::StreamNeeded(IP
 
   RefPtr<StreamNeededRunnable> runnable = new StreamNeededRunnable(this);
   mOwningThread->Dispatch(runnable, NS_DISPATCH_NORMAL);
 }
 
 mozilla::ipc::IPCResult
 IPCBlobInputStreamChild::RecvStreamReady(const OptionalIPCStream& aStream)
 {
-  nsCOMPtr<nsIInputStream> stream = DeserializeIPCStream(aStream);
+  nsCOMPtr<nsIInputStream> stream = mozilla::ipc::DeserializeIPCStream(aStream);
 
   RefPtr<IPCBlobInputStream> pendingStream;
   nsCOMPtr<nsIEventTarget> eventTarget;
 
   {
     MutexAutoLock lock(mMutex);
     MOZ_ASSERT(!mPendingOperations.IsEmpty());
     MOZ_ASSERT(mActorAlive);
--- a/dom/file/ipc/IPCBlobInputStreamParent.cpp
+++ b/dom/file/ipc/IPCBlobInputStreamParent.cpp
@@ -1,16 +1,17 @@
 /* -*- 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 "IPCBlobInputStreamParent.h"
 #include "IPCBlobInputStreamStorage.h"
+#include "mozilla/ipc/IPCStreamUtils.h"
 #include "nsContentUtils.h"
 
 namespace mozilla {
 namespace dom {
 
 template<typename M>
 /* static */ IPCBlobInputStreamParent*
 IPCBlobInputStreamParent::Create(nsIInputStream* aInputStream, uint64_t aSize,
@@ -86,17 +87,17 @@ IPCBlobInputStreamParent::RecvStreamNeed
   if (!stream) {
     if (!SendStreamReady(void_t())) {
       return IPC_FAIL(this, "SendStreamReady failed");
     }
 
     return IPC_OK();
   }
 
-  AutoIPCStream ipcStream;
+  mozilla::ipc::AutoIPCStream ipcStream;
   bool ok = false;
 
   if (mContentManager) {
     MOZ_ASSERT(NS_IsMainThread());
     ok = ipcStream.Serialize(stream, mContentManager);
   } else {
     MOZ_ASSERT(mPBackgroundManager);
     ok = ipcStream.Serialize(stream, mPBackgroundManager);