/* 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 "Blob.h" #include "ContentChild.h" #include "ContentParent.h" #include "FileDescriptorSetChild.h" #include "jsapi.h" #include "mozilla/Assertions.h" #include "mozilla/DebugOnly.h" #include "mozilla/Monitor.h" #include "mozilla/unused.h" #include "mozilla/dom/nsIContentParent.h" #include "mozilla/dom/nsIContentChild.h" #include "mozilla/dom/PBlobStreamChild.h" #include "mozilla/dom/PBlobStreamParent.h" #include "mozilla/dom/PFileDescriptorSetParent.h" #include "mozilla/ipc/InputStreamUtils.h" #include "nsCOMPtr.h" #include "nsDOMFile.h" #include "nsIDOMFile.h" #include "nsIInputStream.h" #include "nsIIPCSerializableInputStream.h" #include "nsIMultiplexInputStream.h" #include "nsIRemoteBlob.h" #include "nsISeekableStream.h" #include "nsNetCID.h" #include "nsProxyRelease.h" #include "nsThreadUtils.h" #define PRIVATE_REMOTE_INPUT_STREAM_IID \ {0x30c7699f, 0x51d2, 0x48c8, {0xad, 0x56, 0xc0, 0x16, 0xd7, 0x6f, 0x71, 0x27}} using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::ipc; namespace { enum ActorType { ChildActor, ParentActor }; // Ensure that a nsCOMPtr/nsRefPtr is released on the main thread. template