/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set sw=4 ts=8 et 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 "mozilla/Assertions.h" #include "mozilla/DebugOnly.h" #include "base/basictypes.h" #include "Blob.h" #include "nsIDOMFile.h" #include "nsIInputStream.h" #include "nsIIPCSerializableInputStream.h" #include "nsIMultiplexInputStream.h" #include "nsIRemoteBlob.h" #include "nsISeekableStream.h" #include "mozilla/Monitor.h" #include "mozilla/unused.h" #include "mozilla/ipc/InputStreamUtils.h" #include "mozilla/dom/PFileDescriptorSetParent.h" #include "nsDOMFile.h" #include "nsProxyRelease.h" #include "nsThreadUtils.h" #include "jsapi.h" #include "ContentChild.h" #include "ContentParent.h" #include "nsNetCID.h" #include "FileDescriptorSetChild.h" #define PRIVATE_REMOTE_INPUT_STREAM_IID \ {0x30c7699f, 0x51d2, 0x48c8, {0xad, 0x56, 0xc0, 0x16, 0xd7, 0x6f, 0x71, 0x27}} using namespace mozilla::dom; using namespace mozilla::dom::ipc; using namespace mozilla::ipc; namespace { /** * Ensure that a nsCOMPtr/nsRefPtr is released on the main thread. */ template