michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "Blob.h" michael@0: michael@0: #include "ContentChild.h" michael@0: #include "ContentParent.h" michael@0: #include "FileDescriptorSetChild.h" michael@0: #include "jsapi.h" michael@0: #include "mozilla/Assertions.h" michael@0: #include "mozilla/DebugOnly.h" michael@0: #include "mozilla/Monitor.h" michael@0: #include "mozilla/unused.h" michael@0: #include "mozilla/dom/PBlobStreamChild.h" michael@0: #include "mozilla/dom/PBlobStreamParent.h" michael@0: #include "mozilla/dom/PFileDescriptorSetParent.h" michael@0: #include "mozilla/ipc/InputStreamUtils.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsDOMFile.h" michael@0: #include "nsIDOMFile.h" michael@0: #include "nsIInputStream.h" michael@0: #include "nsIIPCSerializableInputStream.h" michael@0: #include "nsIMultiplexInputStream.h" michael@0: #include "nsIRemoteBlob.h" michael@0: #include "nsISeekableStream.h" michael@0: #include "nsNetCID.h" michael@0: #include "nsProxyRelease.h" michael@0: #include "nsThreadUtils.h" michael@0: michael@0: #define PRIVATE_REMOTE_INPUT_STREAM_IID \ michael@0: {0x30c7699f, 0x51d2, 0x48c8, {0xad, 0x56, 0xc0, 0x16, 0xd7, 0x6f, 0x71, 0x27}} michael@0: michael@0: using namespace mozilla; michael@0: using namespace mozilla::dom; michael@0: using namespace mozilla::ipc; michael@0: michael@0: namespace { michael@0: michael@0: enum ActorType michael@0: { michael@0: ChildActor, michael@0: ParentActor michael@0: }; michael@0: michael@0: // Ensure that a nsCOMPtr/nsRefPtr is released on the main thread. michael@0: template