Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw

This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
This commit is contained in:
Nika Layzell 2022-05-13 14:16:09 +00:00
parent ef3794b3c5
commit 2b307c5cea
66 changed files with 20 additions and 612 deletions

View File

@ -4,7 +4,6 @@
* 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;
include protocol PBrowser;
include protocol PDocAccessiblePlatformExt;

View File

@ -4,7 +4,6 @@
* 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;
include protocol PBrowser;
include DocAccessibleTypes;

View File

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include protocol PFileDescriptorSet; // FIXME: bug 792908
include protocol PRemoteLazyInputStream; // FIXME: bug 792908
include DOMTypes;

View File

@ -12,13 +12,11 @@
#include "mozilla/dom/cache/ManagerId.h"
#include "mozilla/dom/cache/ReadStream.h"
#include "mozilla/dom/cache/SavedTypes.h"
#include "mozilla/ipc/FileDescriptorSetParent.h"
#include "mozilla/ipc/InputStreamUtils.h"
#include "mozilla/ipc/IPCStreamUtils.h"
namespace mozilla::dom::cache {
using mozilla::ipc::FileDescriptorSetParent;
using mozilla::ipc::PBackgroundParent;
CacheOpParent::CacheOpParent(PBackgroundParent* aIpcManager, CacheId aCacheId,

View File

@ -11,19 +11,14 @@
#include "mozilla/dom/cache/CacheTypes.h"
#include "mozilla/dom/cache/CacheWorkerRef.h"
#include "mozilla/dom/cache/ReadStream.h"
#include "mozilla/ipc/FileDescriptorSetChild.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/PBackgroundChild.h"
#include "mozilla/ipc/PFileDescriptorSetChild.h"
#include "nsISupportsImpl.h"
namespace mozilla::dom::cache {
using mozilla::dom::OptionalFileDescriptorSet;
using mozilla::ipc::AutoIPCStream;
using mozilla::ipc::FileDescriptor;
using mozilla::ipc::FileDescriptorSetChild;
using mozilla::ipc::PFileDescriptorSetChild;
// declared in ActorUtils.h
already_AddRefed<PCacheStreamControlChild> AllocPCacheStreamControlChild() {

View File

@ -11,20 +11,15 @@
#include "mozilla/dom/cache/CacheTypes.h"
#include "mozilla/dom/cache/ReadStream.h"
#include "mozilla/dom/cache/StreamList.h"
#include "mozilla/ipc/FileDescriptorSetParent.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/PBackgroundParent.h"
#include "mozilla/ipc/PFileDescriptorSetParent.h"
#include "nsISupportsImpl.h"
#include "nsTArray.h"
namespace mozilla::dom::cache {
using mozilla::dom::OptionalFileDescriptorSet;
using mozilla::ipc::AutoIPCStream;
using mozilla::ipc::FileDescriptor;
using mozilla::ipc::FileDescriptorSetParent;
using mozilla::ipc::PFileDescriptorSetParent;
// declared in ActorUtils.h
void DeallocPCacheStreamControlParent(PCacheStreamControlParent* aActor) {

View File

@ -5,7 +5,6 @@
include protocol PBackground;
include protocol PCacheOp;
include protocol PCacheStreamControl;
include protocol PFileDescriptorSet;
include CacheTypes;

View File

@ -5,7 +5,6 @@
include protocol PCache;
include protocol PCacheStorage;
include protocol PCacheStreamControl;
include protocol PFileDescriptorSet;
include CacheTypes;

View File

@ -6,7 +6,6 @@ include protocol PBackground;
include protocol PCache;
include protocol PCacheOp;
include protocol PCacheStreamControl;
include protocol PFileDescriptorSet;
include CacheTypes;

View File

@ -3,7 +3,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include protocol PFileDescriptorSet;
include IPCStream;
using struct nsID from "nsID.h";

View File

@ -20,7 +20,6 @@
#include "mozilla/ipc/BackgroundChild.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/PBackgroundChild.h"
#include "mozilla/ipc/PFileDescriptorSetChild.h"
#include "mozilla/ipc/InputStreamUtils.h"
#include "nsCharSeparatedTokenizer.h"
#include "nsCOMPtr.h"
@ -38,7 +37,6 @@ using mozilla::ipc::AutoIPCStream;
using mozilla::ipc::BackgroundChild;
using mozilla::ipc::FileDescriptor;
using mozilla::ipc::PBackgroundChild;
using mozilla::ipc::PFileDescriptorSetChild;
namespace {

View File

@ -4,7 +4,6 @@
include protocol PClientManager;
include protocol PClientHandleOp;
include protocol PFileDescriptorSet;
include protocol PRemoteLazyInputStream;
include ClientIPCTypes;

View File

@ -7,7 +7,6 @@ include protocol PClientHandle;
include protocol PClientManagerOp;
include protocol PClientNavigateOp;
include protocol PClientSource;
include protocol PFileDescriptorSet;
include protocol PRemoteLazyInputStream;
include ClientIPCTypes;

View File

@ -4,7 +4,6 @@
include protocol PClientManager;
include protocol PClientSourceOp;
include protocol PFileDescriptorSet;
include protocol PRemoteLazyInputStream;
include ClientIPCTypes;

View File

@ -1,22 +0,0 @@
/* 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;
include "mozilla/ipc/ProtocolMessageUtils.h";
using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
namespace mozilla {
namespace dom {
union OptionalFileDescriptorSet
{
PFileDescriptorSet;
FileDescriptor[];
void_t;
};
}
}

View File

@ -3,7 +3,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include protocol PFileDescriptorSet;
include protocol PRemoteLazyInputStream;
include IPCBlob;

View File

@ -4,7 +4,6 @@
include protocol PBackground;
include protocol PContent;
include protocol PFileDescriptorSet;
include protocol PSocketProcess;
include IPCStream;

View File

@ -3,7 +3,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include protocol PFileDescriptorSet;
include protocol PRemoteLazyInputStream;
include IPCBlob;

View File

@ -45,7 +45,6 @@ UNIFIED_SOURCES += [
]
IPDL_SOURCES += [
"BlobTypes.ipdlh",
"IPCBlob.ipdlh",
"PFileCreator.ipdl",
"PRemoteLazyInputStream.ipdl",

View File

@ -4,7 +4,6 @@
include protocol PBackgroundFileRequest;
include protocol PBackgroundMutableFile;
include protocol PFileDescriptorSet; // FIXME: bug 792908
include protocol PRemoteLazyInputStream; // FIXME: bug 792908
include IPCBlob;

View File

@ -5,7 +5,6 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include protocol PFileDescriptorSet;
include protocol PRemoteLazyInputStream;
include IPCBlob;

View File

@ -5,7 +5,6 @@
include protocol PBackgroundIDBTransaction;
include protocol PBackgroundIDBVersionChangeTransaction;
include protocol PBackgroundMutableFile;
include protocol PFileDescriptorSet; // FIXME: bug 792908
include protocol PRemoteLazyInputStream; // FIXME: bug 792908
include PBackgroundIDBSharedTypes;

View File

@ -8,7 +8,6 @@ include protocol PBackgroundIDBFactory;
include protocol PBackgroundIDBTransaction;
include protocol PBackgroundIDBVersionChangeTransaction;
include protocol PBackgroundMutableFile;
include protocol PFileDescriptorSet; // FIXME: bug 792908
include protocol PRemoteLazyInputStream; // FIXME: bug 792908
include IPCBlob;

View File

@ -5,7 +5,6 @@
include protocol PBackgroundIDBTransaction;
include protocol PBackgroundIDBVersionChangeTransaction;
include protocol PBackgroundMutableFile;
include protocol PFileDescriptorSet; // FIXME: bug 792908
include protocol PRemoteLazyInputStream; // FIXME: bug 792908
include PBackgroundIDBSharedTypes;

View File

@ -4,7 +4,6 @@
include protocol PBackgroundIDBDatabaseFile;
include protocol PBackgroundMutableFile;
include protocol PFileDescriptorSet; // FIXME: bug 792908
include protocol PRemoteLazyInputStream; // FIXME: bug 792908
include DOMTypes;

View File

@ -7,7 +7,6 @@ include protocol PBackgroundIDBDatabase;
include protocol PBackgroundIDBDatabaseFile;
include protocol PBackgroundIDBRequest;
include protocol PBackgroundMutableFile;
include protocol PFileDescriptorSet; // FIXME: bug 792908
include protocol PRemoteLazyInputStream; // FIXME: bug 792908
include PBackgroundIDBSharedTypes;

View File

@ -98,7 +98,6 @@
#include "mozilla/intl/LocaleService.h"
#include "mozilla/ipc/BackgroundChild.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/FileDescriptorSetChild.h"
#include "mozilla/ipc/FileDescriptorUtils.h"
#include "mozilla/ipc/GeckoChildProcessHost.h"
#include "mozilla/ipc/ProcessChild.h"
@ -1879,28 +1878,6 @@ void ContentChild::GetAvailableDictionaries(
aDictionaries = mAvailableDictionaries.Clone();
}
PFileDescriptorSetChild* ContentChild::SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) {
MOZ_ASSERT(NS_IsMainThread());
if (IsShuttingDown()) {
return nullptr;
}
return PContentChild::SendPFileDescriptorSetConstructor(aFD);
}
PFileDescriptorSetChild* ContentChild::AllocPFileDescriptorSetChild(
const FileDescriptor& aFD) {
return new FileDescriptorSetChild(aFD);
}
bool ContentChild::DeallocPFileDescriptorSetChild(
PFileDescriptorSetChild* aActor) {
delete static_cast<FileDescriptorSetChild*>(aActor);
return true;
}
already_AddRefed<PRemoteLazyInputStreamChild>
ContentChild::AllocPRemoteLazyInputStreamChild(const nsID& aID,
const uint64_t& aSize) {

View File

@ -45,10 +45,6 @@ class RemoteSpellcheckEngineChild;
class ChildProfilerController;
class BenchmarkStorageChild;
namespace ipc {
class PFileDescriptorSetChild;
} // namespace ipc
namespace loader {
class PScriptCacheChild;
}
@ -76,7 +72,6 @@ class ContentChild final : public PContentChild,
public ProcessActor {
using ClonedMessageData = mozilla::dom::ClonedMessageData;
using FileDescriptor = mozilla::ipc::FileDescriptor;
using PFileDescriptorSetChild = mozilla::ipc::PFileDescriptorSetChild;
friend class PContentChild;
@ -466,10 +461,6 @@ class ContentChild final : public PContentChild,
bool IsForBrowser() const { return mIsForBrowser; }
PFileDescriptorSetChild* AllocPFileDescriptorSetChild(const FileDescriptor&);
bool DeallocPFileDescriptorSetChild(PFileDescriptorSetChild*);
MOZ_CAN_RUN_SCRIPT_BOUNDARY mozilla::ipc::IPCResult RecvConstructBrowser(
ManagedEndpoint<PBrowserChild>&& aBrowserEp,
ManagedEndpoint<PWindowGlobalChild>&& aWindowEp, const TabId& aTabId,
@ -647,9 +638,6 @@ class ContentChild final : public PContentChild,
Endpoint<PSandboxTestingChild>&& aEndpoint);
#endif
PFileDescriptorSetChild* SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) override;
private:
static void ForceKillTimerCallback(nsITimer* aTimer, void* aClosure);
void StartForceKillTimer();

View File

@ -147,7 +147,6 @@
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/CrashReporterHost.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/FileDescriptorSetParent.h"
#include "mozilla/ipc/FileDescriptorUtils.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/TestShellParent.h"
@ -5012,17 +5011,6 @@ ContentParent::AllocPExtensionsParent() {
return MakeAndAddRef<extensions::ExtensionsParent>();
}
PFileDescriptorSetParent* ContentParent::AllocPFileDescriptorSetParent(
const FileDescriptor& aFD) {
return new FileDescriptorSetParent(aFD);
}
bool ContentParent::DeallocPFileDescriptorSetParent(
PFileDescriptorSetParent* aActor) {
delete static_cast<FileDescriptorSetParent*>(aActor);
return true;
}
void ContentParent::NotifyUpdatedDictionaries() {
RefPtr<mozSpellChecker> spellChecker(mozSpellChecker::Create());
MOZ_ASSERT(spellChecker, "No spell checker?");
@ -7244,12 +7232,6 @@ mozilla::ipc::IPCResult ContentParent::RecvCommitBrowsingContextTransaction(
return aTransaction.CommitFromIPC(aContext, this);
}
PFileDescriptorSetParent* ContentParent::SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) {
MOZ_ASSERT(NS_IsMainThread());
return PContentParent::SendPFileDescriptorSetConstructor(aFD);
}
mozilla::ipc::IPCResult ContentParent::RecvBlobURLDataRequest(
const nsCString& aBlobURL, nsIPrincipal* aTriggeringPrincipal,
nsIPrincipal* aLoadingPrincipal, const OriginAttributes& aOriginAttributes,

View File

@ -74,7 +74,6 @@ using mozilla::loader::PScriptCacheParent;
namespace ipc {
class CrashReporterHost;
class PFileDescriptorSetParent;
class TestShellParent;
#ifdef FUZZING
class ProtocolFuzzerHelper;
@ -123,7 +122,6 @@ class ContentParent final
public mozilla::ipc::ParentToChildStreamActorManager,
public ProcessActor {
typedef mozilla::ipc::GeckoChildProcessHost GeckoChildProcessHost;
typedef mozilla::ipc::PFileDescriptorSetParent PFileDescriptorSetParent;
typedef mozilla::ipc::TestShellParent TestShellParent;
typedef mozilla::ipc::PrincipalInfo PrincipalInfo;
typedef mozilla::dom::ClonedMessageData ClonedMessageData;
@ -675,9 +673,6 @@ class ContentParent final
FORWARD_SHMEM_ALLOCATOR_TO(PContentParent)
PFileDescriptorSetParent* SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) override;
mozilla::ipc::IPCResult RecvBlobURLDataRequest(
const nsCString& aBlobURL, nsIPrincipal* pTriggeringPrincipal,
nsIPrincipal* pLoadingPrincipal,
@ -1146,11 +1141,6 @@ class ContentParent final
already_AddRefed<extensions::PExtensionsParent> AllocPExtensionsParent();
PFileDescriptorSetParent* AllocPFileDescriptorSetParent(
const mozilla::ipc::FileDescriptor&);
bool DeallocPFileDescriptorSetParent(PFileDescriptorSetParent*);
#ifdef MOZ_WEBRTC
PWebrtcGlobalParent* AllocPWebrtcGlobalParent();
bool DeallocPWebrtcGlobalParent(PWebrtcGlobalParent* aActor);

View File

@ -12,7 +12,6 @@ include protocol PDocAccessible;
#endif
include protocol PFilePicker;
include protocol PRemotePrintJob;
include protocol PFileDescriptorSet;
include protocol PRemoteLazyInputStream;
include protocol PPaymentRequest;
include protocol PSessionStore;

View File

@ -13,7 +13,6 @@ include protocol PDocumentChannel;
include protocol PExtensions;
include protocol PExternalHelperApp;
include protocol PHandlerService;
include protocol PFileDescriptorSet;
include protocol PHal;
include protocol PHeapSnapshotTempFileHelper;
include protocol PProcessHangMonitor;
@ -461,7 +460,6 @@ sync protocol PContent
manages PCycleCollectWithLogs;
manages PExtensions;
manages PExternalHelperApp;
manages PFileDescriptorSet;
manages PHal;
manages PHandlerService;
manages PHeapSnapshotTempFileHelper;
@ -539,8 +537,6 @@ child:
bool isForBrowser, bool isTopLevel);
both:
async PFileDescriptorSet(FileDescriptor fd);
// For parent->child, aBrowser must be non-null; aContext can
// be null to indicate the browser's current root document, or non-null
// to persist a subdocument. For child->parent, arguments are

View File

@ -5,7 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBrowser;
include protocol PFileDescriptorSet;
include protocol PRemoteLazyInputStream;
include IPCBlob;

View File

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include protocol PFileDescriptorSet; // FIXME: bug 792908
include protocol PRemoteLazyInputStream; // FIXME: bug 792908
include DOMTypes;

View File

@ -7,7 +7,6 @@
include protocol PNecko;
include protocol PBackground;
include protocol PFileDescriptorSet; // FIXME: bug #792908
include IPCStream;

View File

@ -6,7 +6,6 @@
include protocol PContent;
include protocol PWebBrowserPersistResources;
include protocol PWebBrowserPersistSerialize;
include protocol PFileDescriptorSet;
include PBackgroundSharedTypes;
include IPCStream;

View File

@ -8,7 +8,6 @@
#include "ActorsChild.h" // IndexedDB
#include "BroadcastChannelChild.h"
#include "FileDescriptorSetChild.h"
#ifdef MOZ_WEBRTC
# include "CamerasChild.h"
#endif
@ -392,19 +391,6 @@ BackgroundChildImpl::AllocPRemoteLazyInputStreamChild(const nsID& aID,
return actor.forget();
}
PFileDescriptorSetChild* BackgroundChildImpl::AllocPFileDescriptorSetChild(
const FileDescriptor& aFileDescriptor) {
return new FileDescriptorSetChild(aFileDescriptor);
}
bool BackgroundChildImpl::DeallocPFileDescriptorSetChild(
PFileDescriptorSetChild* aActor) {
MOZ_ASSERT(aActor);
delete static_cast<FileDescriptorSetChild*>(aActor);
return true;
}
PUDPSocketChild* BackgroundChildImpl::AllocPUDPSocketChild(
const Maybe<PrincipalInfo>& aPrincipalInfo, const nsCString& aFilter) {
MOZ_CRASH("AllocPUDPSocket should not be called");
@ -646,11 +632,6 @@ bool BackgroundChildImpl::DeallocPMediaTransportChild(
return true;
}
PFileDescriptorSetChild* BackgroundChildImpl::SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) {
return PBackgroundChild::SendPFileDescriptorSetConstructor(aFD);
}
} // namespace mozilla::ipc
mozilla::ipc::IPCResult TestChild::Recv__delete__(const nsCString& aTestArg) {

View File

@ -41,9 +41,6 @@ class BackgroundChildImpl : public PBackgroundChild,
// This functions is implemented in BackgroundImpl.cpp.
static ThreadLocal* GetThreadLocalForCurrentThread();
PFileDescriptorSetChild* SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) override;
protected:
BackgroundChildImpl();
virtual ~BackgroundChildImpl();
@ -156,12 +153,6 @@ class BackgroundChildImpl : public PBackgroundChild,
virtual bool DeallocPSharedWorkerChild(
mozilla::dom::PSharedWorkerChild* aActor) override;
virtual PFileDescriptorSetChild* AllocPFileDescriptorSetChild(
const FileDescriptor& aFileDescriptor) override;
virtual bool DeallocPFileDescriptorSetChild(
PFileDescriptorSetChild* aActor) override;
virtual PCamerasChild* AllocPCamerasChild() override;
virtual bool DeallocPCamerasChild(PCamerasChild* aActor) override;

View File

@ -7,7 +7,6 @@
#include "BackgroundParentImpl.h"
#include "BroadcastChannelParent.h"
#include "FileDescriptorSetParent.h"
#ifdef MOZ_WEBRTC
# include "CamerasParent.h"
#endif
@ -669,24 +668,6 @@ BackgroundParentImpl::AllocPRemoteLazyInputStreamParent(const nsID& aID,
return actor.forget();
}
PFileDescriptorSetParent* BackgroundParentImpl::AllocPFileDescriptorSetParent(
const FileDescriptor& aFileDescriptor) {
AssertIsInMainOrSocketProcess();
AssertIsOnBackgroundThread();
return new FileDescriptorSetParent(aFileDescriptor);
}
bool BackgroundParentImpl::DeallocPFileDescriptorSetParent(
PFileDescriptorSetParent* aActor) {
AssertIsInMainOrSocketProcess();
AssertIsOnBackgroundThread();
MOZ_ASSERT(aActor);
delete static_cast<FileDescriptorSetParent*>(aActor);
return true;
}
already_AddRefed<BackgroundParentImpl::PVsyncParent>
BackgroundParentImpl::AllocPVsyncParent() {
AssertIsInMainOrSocketProcess();
@ -1472,12 +1453,6 @@ BackgroundParentImpl::AllocPLockManagerParent(
aClientId);
}
PFileDescriptorSetParent*
BackgroundParentImpl::SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) {
return PBackgroundParent::SendPFileDescriptorSetConstructor(aFD);
}
already_AddRefed<mozilla::net::PWebSocketConnectionParent>
BackgroundParentImpl::AllocPWebSocketConnectionParent(
const uint32_t& aListenerId) {

View File

@ -17,10 +17,6 @@ namespace mozilla::ipc {
// to be inherited in BackgroundImpl.
class BackgroundParentImpl : public PBackgroundParent,
public ParentToChildStreamActorManager {
public:
PFileDescriptorSetParent* SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) override;
protected:
BackgroundParentImpl();
virtual ~BackgroundParentImpl();
@ -201,12 +197,6 @@ class BackgroundParentImpl : public PBackgroundParent,
bool DeallocPSharedWorkerParent(PSharedWorkerParent* aActor) override;
PFileDescriptorSetParent* AllocPFileDescriptorSetParent(
const FileDescriptor& aFileDescriptor) override;
bool DeallocPFileDescriptorSetParent(
PFileDescriptorSetParent* aActor) override;
already_AddRefed<PVsyncParent> AllocPVsyncParent() override;
already_AddRefed<mozilla::psm::PVerifySSLServerCertParent>

View File

@ -1,31 +0,0 @@
/* -*- 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 "FileDescriptorSetChild.h"
namespace mozilla::ipc {
FileDescriptorSetChild::FileDescriptorSetChild(
const FileDescriptor& aFileDescriptor) {
mFileDescriptors.AppendElement(aFileDescriptor);
}
FileDescriptorSetChild::~FileDescriptorSetChild() {
MOZ_ASSERT(mFileDescriptors.IsEmpty());
}
void FileDescriptorSetChild::ForgetFileDescriptors(
nsTArray<FileDescriptor>& aFileDescriptors) {
aFileDescriptors = std::move(mFileDescriptors);
}
mozilla::ipc::IPCResult FileDescriptorSetChild::RecvAddFileDescriptor(
const FileDescriptor& aFileDescriptor) {
mFileDescriptors.AppendElement(aFileDescriptor);
return IPC_OK();
}
} // namespace mozilla::ipc

View File

@ -1,56 +0,0 @@
/* -*- 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/. */
#ifndef mozilla_ipc_FileDescriptorSetChild_h__
#define mozilla_ipc_FileDescriptorSetChild_h__
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/ipc/PFileDescriptorSetChild.h"
#include "nsTArray.h"
namespace mozilla {
namespace dom {
class ContentChild;
} // namespace dom
namespace net {
class SocketProcessChild;
} // namespace net
namespace ipc {
class BackgroundChildImpl;
class FileDescriptor;
class FileDescriptorSetChild final : public PFileDescriptorSetChild {
friend class BackgroundChildImpl;
friend class mozilla::dom::ContentChild;
friend class mozilla::net::SocketProcessChild;
friend class PFileDescriptorSetChild;
nsTArray<FileDescriptor> mFileDescriptors;
public:
void ForgetFileDescriptors(nsTArray<FileDescriptor>& aFileDescriptors);
private:
explicit FileDescriptorSetChild(const FileDescriptor& aFileDescriptor);
~FileDescriptorSetChild();
mozilla::ipc::IPCResult RecvAddFileDescriptor(
const FileDescriptor& aFileDescriptor);
};
} // namespace ipc
} // namespace mozilla
#endif // mozilla_ipc_FileDescriptorSetChild_h__

View File

@ -1,33 +0,0 @@
/* -*- 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 "FileDescriptorSetParent.h"
namespace mozilla::ipc {
FileDescriptorSetParent::FileDescriptorSetParent(
const FileDescriptor& aFileDescriptor) {
mFileDescriptors.AppendElement(aFileDescriptor);
}
FileDescriptorSetParent::~FileDescriptorSetParent() = default;
void FileDescriptorSetParent::ForgetFileDescriptors(
nsTArray<FileDescriptor>& aFileDescriptors) {
aFileDescriptors = std::move(mFileDescriptors);
}
void FileDescriptorSetParent::ActorDestroy(ActorDestroyReason aWhy) {
// Implement me! Bug 1005157
}
mozilla::ipc::IPCResult FileDescriptorSetParent::RecvAddFileDescriptor(
const FileDescriptor& aFileDescriptor) {
mFileDescriptors.AppendElement(aFileDescriptor);
return IPC_OK();
}
} // namespace mozilla::ipc

View File

@ -1,58 +0,0 @@
/* -*- 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/. */
#ifndef mozilla_ipc_FileDescriptorSetParent_h__
#define mozilla_ipc_FileDescriptorSetParent_h__
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/ipc/PFileDescriptorSetParent.h"
#include "nsTArray.h"
namespace mozilla {
namespace dom {
class ContentParent;
} // namespace dom
namespace net {
class SocketProcessParent;
} // namespace net
namespace ipc {
class BackgroundParentImpl;
class FileDescriptor;
class FileDescriptorSetParent final : public PFileDescriptorSetParent {
friend class BackgroundParentImpl;
friend class mozilla::dom::ContentParent;
friend class mozilla::net::SocketProcessParent;
friend class PFileDescriptorSetParent;
nsTArray<FileDescriptor> mFileDescriptors;
public:
void ForgetFileDescriptors(nsTArray<FileDescriptor>& aFileDescriptors);
private:
explicit FileDescriptorSetParent(const FileDescriptor& aFileDescriptor);
~FileDescriptorSetParent();
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
mozilla::ipc::IPCResult RecvAddFileDescriptor(
const FileDescriptor& aFileDescriptor);
};
} // namespace ipc
} // namespace mozilla
#endif // mozilla_ipc_FileDescriptorSetParent_h__

View File

@ -2,7 +2,6 @@
* 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 BlobTypes;
include InputStreamParams;
include ProtocolTypes;
@ -14,7 +13,6 @@ namespace ipc {
struct IPCStream
{
InputStreamParams stream;
OptionalFileDescriptorSet optionalFds;
};
} // namespace ipc

View File

@ -13,8 +13,6 @@
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/File.h"
#include "mozilla/ipc/FileDescriptorSetChild.h"
#include "mozilla/ipc/FileDescriptorSetParent.h"
#include "mozilla/ipc/InputStreamUtils.h"
#include "mozilla/net/SocketProcessChild.h"
#include "mozilla/net/SocketProcessParent.h"
@ -58,17 +56,7 @@ bool SerializeInputStreamWithFdsChild(nsIIPCSerializableInputStream* aStream,
MOZ_CRASH("Serialize failed!");
}
if (fds.IsEmpty()) {
aValue.optionalFds() = void_t();
} else {
PFileDescriptorSetChild* fdSet =
aManager->SendPFileDescriptorSetConstructor(fds[0]);
for (uint32_t i = 1; i < fds.Length(); ++i) {
Unused << fdSet->SendAddFileDescriptor(fds[i]);
}
aValue.optionalFds() = fdSet;
}
MOZ_ASSERT(fds.IsEmpty(), "argument is unused");
return true;
}
@ -93,22 +81,7 @@ bool SerializeInputStreamWithFdsParent(nsIIPCSerializableInputStream* aStream,
MOZ_CRASH("Serialize failed!");
}
aValue.optionalFds() = void_t();
if (!fds.IsEmpty()) {
PFileDescriptorSetParent* fdSet =
aManager->SendPFileDescriptorSetConstructor(fds[0]);
for (uint32_t i = 1; i < fds.Length(); ++i) {
if (NS_WARN_IF(!fdSet->SendAddFileDescriptor(fds[i]))) {
Unused << PFileDescriptorSetParent::Send__delete__(fdSet);
fdSet = nullptr;
break;
}
}
if (fdSet) {
aValue.optionalFds() = fdSet;
}
}
MOZ_ASSERT(fds.IsEmpty(), "argument is unused");
return true;
}
@ -128,7 +101,6 @@ bool SerializeInputStream(nsIInputStream* aStream, IPCStream& aValue,
}
aValue.stream() = params;
aValue.optionalFds() = void_t();
return true;
}
@ -177,7 +149,6 @@ bool SerializeLazyInputStream(nsIInputStream* aStream, IPCStream& aValue,
}
aValue.stream() = RemoteLazyInputStreamParams(actor);
aValue.optionalFds() = void_t();
return true;
}
@ -252,54 +223,6 @@ bool SerializeInputStreamParent(nsIInputStream* aStream, M* aManager,
aDelayedStart);
}
void ActivateAndCleanupIPCStream(IPCStream& aValue, bool aConsumedByIPC,
bool aDelayedStart) {
// Cleanup file descriptors if necessary
if (aValue.optionalFds().type() ==
OptionalFileDescriptorSet::TPFileDescriptorSetChild) {
AutoTArray<FileDescriptor, 4> fds;
auto fdSetActor = static_cast<FileDescriptorSetChild*>(
aValue.optionalFds().get_PFileDescriptorSetChild());
MOZ_ASSERT(fdSetActor);
// FileDescriptorSet doesn't clear its fds in its ActorDestroy, so we
// unconditionally forget them here. The fds themselves are auto-closed
// in ~FileDescriptor since they originated in this process.
fdSetActor->ForgetFileDescriptors(fds);
if (!aConsumedByIPC) {
Unused << FileDescriptorSetChild::Send__delete__(fdSetActor);
}
} else if (aValue.optionalFds().type() ==
OptionalFileDescriptorSet::TPFileDescriptorSetParent) {
AutoTArray<FileDescriptor, 4> fds;
auto fdSetActor = static_cast<FileDescriptorSetParent*>(
aValue.optionalFds().get_PFileDescriptorSetParent());
MOZ_ASSERT(fdSetActor);
// FileDescriptorSet doesn't clear its fds in its ActorDestroy, so we
// unconditionally forget them here. The fds themselves are auto-closed
// in ~FileDescriptor since they originated in this process.
fdSetActor->ForgetFileDescriptors(fds);
if (!aConsumedByIPC) {
Unused << FileDescriptorSetParent::Send__delete__(fdSetActor);
}
}
}
void ActivateAndCleanupIPCStream(Maybe<IPCStream>& aValue, bool aConsumedByIPC,
bool aDelayedStart) {
if (aValue.isNothing()) {
return;
}
ActivateAndCleanupIPCStream(aValue.ref(), aConsumedByIPC, aDelayedStart);
}
// Returns false if the serialization should not proceed. This means that the
// inputStream is null.
bool NormalizeOptionalValue(nsIInputStream* aStream, IPCStream* aValue,
@ -321,32 +244,7 @@ bool NormalizeOptionalValue(nsIInputStream* aStream, IPCStream* aValue,
} // anonymous namespace
already_AddRefed<nsIInputStream> DeserializeIPCStream(const IPCStream& aValue) {
AutoTArray<FileDescriptor, 4> fds;
if (aValue.optionalFds().type() ==
OptionalFileDescriptorSet::TPFileDescriptorSetParent) {
auto fdSetActor = static_cast<FileDescriptorSetParent*>(
aValue.optionalFds().get_PFileDescriptorSetParent());
MOZ_ASSERT(fdSetActor);
fdSetActor->ForgetFileDescriptors(fds);
MOZ_ASSERT(!fds.IsEmpty());
if (!FileDescriptorSetParent::Send__delete__(fdSetActor)) {
// child process is gone, warn and allow actor to clean up normally
NS_WARNING("Failed to delete fd set actor.");
}
} else if (aValue.optionalFds().type() ==
OptionalFileDescriptorSet::TPFileDescriptorSetChild) {
auto fdSetActor = static_cast<FileDescriptorSetChild*>(
aValue.optionalFds().get_PFileDescriptorSetChild());
MOZ_ASSERT(fdSetActor);
fdSetActor->ForgetFileDescriptors(fds);
MOZ_ASSERT(!fds.IsEmpty());
Unused << FileDescriptorSetChild::Send__delete__(fdSetActor);
}
nsTArray<FileDescriptor> fds; // NOTE: Unused, should be removed.
return InputStreamHelper::DeserializeInputStream(aValue.stream(), fds);
}
@ -370,14 +268,7 @@ AutoIPCStream::AutoIPCStream(Maybe<IPCStream>& aTarget, bool aDelayedStart)
mOptionalValue->reset();
}
AutoIPCStream::~AutoIPCStream() {
MOZ_ASSERT(mValue || mOptionalValue);
if (mValue && IsSet()) {
ActivateAndCleanupIPCStream(*mValue, mTaken, mDelayedStart);
} else {
ActivateAndCleanupIPCStream(*mOptionalValue, mTaken, mDelayedStart);
}
}
AutoIPCStream::~AutoIPCStream() { MOZ_ASSERT(mValue || mOptionalValue); }
bool AutoIPCStream::Serialize(nsIInputStream* aStream,
dom::ContentChild* aManager) {

View File

@ -25,7 +25,7 @@ struct StringInputStreamParams
struct FileInputStreamParams
{
uint32_t fileDescriptorIndex;
FileDescriptor fileDescriptor;
int32_t behaviorFlags;
int32_t ioFlags;
};

View File

@ -16,21 +16,11 @@ namespace mozilla {
namespace ipc {
class FileDescriptor;
class PFileDescriptorSetChild;
class PFileDescriptorSetParent;
// Provide two interfaces for sending PFileDescriptorSet constructor messages.
class ParentToChildStreamActorManager {
public:
virtual PFileDescriptorSetParent* SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) = 0;
};
// TODO: These interfaces are no longer necessary and should be removed.
class ParentToChildStreamActorManager {};
class ChildToParentStreamActorManager {
public:
virtual PFileDescriptorSetChild* SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) = 0;
};
class ChildToParentStreamActorManager {};
// If you want to serialize an inputStream, please use AutoIPCStream.
class InputStreamHelper {
@ -48,6 +38,8 @@ class InputStreamHelper {
// pipe in chunks. This sending can start immediatelly or at the first read
// based on the value of |aDelayedStart|. The IPC message size is returned
// into |aSizeUsed|.
// XXX: The aManager and aFileDescriptors arguments are no longer necessary
// and should be removed.
static void SerializeInputStream(nsIInputStream* aInputStream,
InputStreamParams& aParams,
nsTArray<FileDescriptor>& aFileDescriptors,

View File

@ -21,7 +21,6 @@ include protocol PCacheStorage;
include protocol PCacheStreamControl;
include protocol PClientManager;
include protocol PEndpointForReport;
include protocol PFileDescriptorSet;
include protocol PFileSystemRequest;
include protocol PGamepadEventChannel;
include protocol PGamepadTestChannel;
@ -101,7 +100,6 @@ sync protocol PBackground
manages PCacheStreamControl;
manages PClientManager;
manages PEndpointForReport;
manages PFileDescriptorSet;
manages PFileSystemRequest;
manages PGamepadEventChannel;
manages PGamepadTestChannel;
@ -301,8 +299,6 @@ both:
// PRemoteLazyInputStream is created on the parent side only if the child
// starts a migration.
async PRemoteLazyInputStream(nsID aID, uint64_t aSize);
async PFileDescriptorSet(FileDescriptor fd);
};
} // namespace ipc

View File

@ -1,24 +0,0 @@
/* 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 PBackground;
include protocol PContent;
include protocol PSocketProcess;
namespace mozilla {
namespace ipc {
[ManualDealloc]
protocol PFileDescriptorSet
{
manager PBackground or PContent or PSocketProcess;
both:
async AddFileDescriptor(FileDescriptor fd);
async __delete__();
};
} // namespace ipc
} // namespace mozilla

View File

@ -28,8 +28,6 @@ EXPORTS.mozilla.ipc += [
"Endpoint.h",
"EnvironmentMap.h",
"FileDescriptor.h",
"FileDescriptorSetChild.h",
"FileDescriptorSetParent.h",
"FileDescriptorUtils.h",
"GeckoChildProcessHost.h",
"IdleSchedulerChild.h",
@ -197,8 +195,6 @@ UNIFIED_SOURCES += [
SOURCES += [
"BackgroundChildImpl.cpp",
"BackgroundParentImpl.cpp",
"FileDescriptorSetChild.cpp",
"FileDescriptorSetParent.cpp",
]
if CONFIG["OS_ARCH"] == "Darwin":
@ -235,7 +231,6 @@ IPDL_SOURCES = [
"PBackgroundSharedTypes.ipdlh",
"PBackgroundStarter.ipdl",
"PBackgroundTest.ipdl",
"PFileDescriptorSet.ipdl",
"PIdleScheduler.ipdl",
"ProtocolTypes.ipdlh",
"PUtilityAudioDecoder.ipdl",

View File

@ -555,7 +555,7 @@ void nsFileInputStream::Serialize(InputStreamParams& aParams,
MOZ_ASSERT(aSizeUsed);
*aSizeUsed = 0;
SerializeInternal(aParams, aFileDescriptors);
SerializeInternal(aParams);
}
void nsFileInputStream::Serialize(InputStreamParams& aParams,
@ -566,11 +566,10 @@ void nsFileInputStream::Serialize(InputStreamParams& aParams,
MOZ_ASSERT(aSizeUsed);
*aSizeUsed = 0;
SerializeInternal(aParams, aFileDescriptors);
SerializeInternal(aParams);
}
void nsFileInputStream::SerializeInternal(
InputStreamParams& aParams, FileDescriptorArray& aFileDescriptors) {
void nsFileInputStream::SerializeInternal(InputStreamParams& aParams) {
FileInputStreamParams params;
if (NS_SUCCEEDED(DoPendingOpen())) {
@ -578,10 +577,7 @@ void nsFileInputStream::SerializeInternal(
FileHandleType fd = FileHandleType(PR_FileDesc2NativeHandle(mFD));
NS_ASSERTION(fd, "This should never be null!");
DebugOnly dbgFD = aFileDescriptors.AppendElement(fd);
NS_ASSERTION(dbgFD->IsValid(), "Sending an invalid file descriptor!");
params.fileDescriptorIndex() = aFileDescriptors.Length() - 1;
params.fileDescriptor() = FileDescriptor(fd);
Close();
} else {
@ -589,7 +585,7 @@ void nsFileInputStream::SerializeInternal(
"This file has not been opened (or could not be opened). "
"Sending an invalid file descriptor to the other process!");
params.fileDescriptorIndex() = UINT32_MAX;
params.fileDescriptor() = FileDescriptor();
}
int32_t behaviorFlags = mBehaviorFlags;
@ -619,15 +615,7 @@ bool nsFileInputStream::Deserialize(
const FileInputStreamParams& params = aParams.get_FileInputStreamParams();
uint32_t fileDescriptorIndex = params.fileDescriptorIndex();
FileDescriptor fd;
if (fileDescriptorIndex < aFileDescriptors.Length()) {
fd = aFileDescriptors[fileDescriptorIndex];
NS_WARNING_ASSERTION(fd.IsValid(), "Received an invalid file descriptor!");
} else {
NS_WARNING("Received a bad file descriptor index!");
}
const FileDescriptor& fd = params.fileDescriptor();
if (fd.IsValid()) {
auto rawFD = fd.ClonePlatformHandle();
@ -639,6 +627,7 @@ bool nsFileInputStream::Deserialize(
mFD = fileDesc;
mState = eOpened;
} else {
NS_WARNING("Received an invalid file descriptor!");
mState = eError;
mErrorValue = NS_ERROR_FILE_NOT_FOUND;
}

View File

@ -155,8 +155,7 @@ class nsFileInputStream : public nsFileStreamBase,
protected:
virtual ~nsFileInputStream() = default;
void SerializeInternal(mozilla::ipc::InputStreamParams& aParams,
FileDescriptorArray& aFileDescriptors);
void SerializeInternal(mozilla::ipc::InputStreamParams& aParams);
nsresult SeekInternal(int32_t aWhence, int64_t aOffset,
bool aClearBuf = true);

View File

@ -4,6 +4,7 @@
#include "mozilla/SpinEventLoopUntil.h"
#include "nsIOService.h"
#include "nsIPipe.h"
#include "nsSyncStreamListener.h"
#include "nsThreadUtils.h"
#include <algorithm>

View File

@ -29,6 +29,7 @@
#include "nsIDNSRecord.h"
#include "nsIDNSService.h"
#include "nsICancelable.h"
#include "nsIPipe.h"
#include "nsWrapperCacheInlines.h"
#include "HttpConnectionUDP.h"
#include "mozilla/StaticPrefs_network.h"

View File

@ -6,7 +6,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PHttpChannel;
include BlobTypes;
include ClientIPCTypes;
include URIParams;
include IPCServiceWorkerDescriptor;

View File

@ -18,7 +18,6 @@ include protocol PTCPSocket;
include protocol PTCPServerSocket;
include protocol PUDPSocket;
include protocol PDNSRequest;
include protocol PFileDescriptorSet;
include protocol PDataChannel;
include protocol PSimpleChannel;
include protocol PTransportProvider;

View File

@ -9,7 +9,6 @@ include protocol PProfiler;
include protocol PWebrtcTCPSocket;
include protocol PHttpTransaction;
include protocol PHttpConnectionMgr;
include protocol PFileDescriptorSet;
include protocol PInputChannelThrottleQueue;
include protocol PBackgroundStarter;
include protocol PAltService;
@ -94,7 +93,6 @@ sync protocol PSocketProcess
{
manages PDNSRequest;
manages PWebrtcTCPSocket;
manages PFileDescriptorSet;
manages PHttpTransaction;
manages PHttpConnectionMgr;
manages PInputChannelThrottleQueue;
@ -229,7 +227,6 @@ child:
#endif // defined(XP_WIN)
both:
async PFileDescriptorSet(FileDescriptor fd);
async PDNSRequest(nsCString hostName, nsCString trrServer, int32_t port,
uint16_t type, OriginAttributes originAttributes,
uint32_t flags);

View File

@ -20,7 +20,6 @@
#include "mozilla/ipc/CrashReporterClient.h"
#include "mozilla/ipc/BackgroundChild.h"
#include "mozilla/ipc/BackgroundParent.h"
#include "mozilla/ipc/FileDescriptorSetChild.h"
#include "mozilla/ipc/ProcessChild.h"
#include "mozilla/net/AltSvcTransactionChild.h"
#include "mozilla/net/BackgroundDataBridgeParent.h"
@ -353,23 +352,6 @@ SocketProcessChild::AllocPHttpTransactionChild() {
return actor.forget();
}
PFileDescriptorSetChild* SocketProcessChild::AllocPFileDescriptorSetChild(
const FileDescriptor& aFD) {
return new FileDescriptorSetChild(aFD);
}
bool SocketProcessChild::DeallocPFileDescriptorSetChild(
PFileDescriptorSetChild* aActor) {
delete aActor;
return true;
}
PFileDescriptorSetChild* SocketProcessChild::SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) {
MOZ_ASSERT(NS_IsMainThread());
return PSocketProcessChild::SendPFileDescriptorSetConstructor(aFD);
}
already_AddRefed<PHttpConnectionMgrChild>
SocketProcessChild::AllocPHttpConnectionMgrChild(
const HttpHandlerInitArgs& aArgs) {

View File

@ -68,15 +68,9 @@ class SocketProcessChild final
already_AddRefed<PHttpTransactionChild> AllocPHttpTransactionChild();
PFileDescriptorSetChild* AllocPFileDescriptorSetChild(
const FileDescriptor& fd);
bool DeallocPFileDescriptorSetChild(PFileDescriptorSetChild* aActor);
void CleanUp();
void DestroySocketProcessBridgeParent(ProcessId aId);
PFileDescriptorSetChild* SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) override;
already_AddRefed<PHttpConnectionMgrChild> AllocPHttpConnectionMgrChild(
const HttpHandlerInitArgs& aArgs);
mozilla::ipc::IPCResult RecvUpdateDeviceModelId(const nsCString& aModelId);

View File

@ -13,7 +13,6 @@
#include "mozilla/Components.h"
#include "mozilla/dom/MemoryReportRequest.h"
#include "mozilla/FOGIPC.h"
#include "mozilla/ipc/FileDescriptorSetParent.h"
#include "mozilla/net/DNSRequestParent.h"
#include "mozilla/net/ProxyConfigLookupParent.h"
#include "mozilla/RemoteLazyInputStreamParent.h"
@ -232,24 +231,6 @@ mozilla::ipc::IPCResult SocketProcessParent::RecvPDNSRequestConstructor(
return IPC_OK();
}
mozilla::ipc::PFileDescriptorSetParent*
SocketProcessParent::AllocPFileDescriptorSetParent(const FileDescriptor& aFD) {
return new mozilla::ipc::FileDescriptorSetParent(aFD);
}
bool SocketProcessParent::DeallocPFileDescriptorSetParent(
PFileDescriptorSetParent* aActor) {
delete static_cast<mozilla::ipc::FileDescriptorSetParent*>(aActor);
return true;
}
mozilla::ipc::PFileDescriptorSetParent*
SocketProcessParent::SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) {
MOZ_ASSERT(NS_IsMainThread());
return PSocketProcessParent::SendPFileDescriptorSetConstructor(aFD);
}
mozilla::ipc::IPCResult SocketProcessParent::RecvObserveHttpActivity(
const HttpActivityArgs& aArgs, const uint32_t& aActivityType,
const uint32_t& aActivitySubtype, const PRTime& aTimestamp,

View File

@ -70,13 +70,6 @@ class SocketProcessParent final
const bool& aMinimizeMemoryUsage,
const Maybe<ipc::FileDescriptor>& aDMDFile);
PFileDescriptorSetParent* AllocPFileDescriptorSetParent(
const FileDescriptor& fd);
bool DeallocPFileDescriptorSetParent(PFileDescriptorSetParent* aActor);
PFileDescriptorSetParent* SendPFileDescriptorSetConstructor(
const FileDescriptor& aFD) override;
mozilla::ipc::IPCResult RecvObserveHttpActivity(
const HttpActivityArgs& aArgs, const uint32_t& aActivityType,
const uint32_t& aActivitySubtype, const PRTime& aTimestamp,

View File

@ -18,7 +18,6 @@
#include "mozilla/dom/ServiceWorkerUtils.h"
#include "mozilla/dom/BrowserChild.h"
#include "mozilla/extensions/StreamFilterParent.h"
#include "mozilla/ipc/FileDescriptorSetChild.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/net/NeckoChild.h"
#include "mozilla/net/HttpChannelChild.h"

View File

@ -8,7 +8,6 @@
#include "HttpLog.h"
#include "mozilla/ConsoleReportCollector.h"
#include "mozilla/ipc/FileDescriptorSetParent.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/net/HttpChannelParent.h"
#include "mozilla/dom/ContentParent.h"

View File

@ -6,7 +6,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PSocketProcess;
include protocol PFileDescriptorSet; // FIXME: bug #792908
include protocol PInputChannelThrottleQueue;
include IPCStream;

View File

@ -11,8 +11,6 @@ include protocol PTransportProvider;
include IPCStream;
include NeckoChannelParams;
include protocol PFileDescriptorSet; //FIXME: bug #792908
include "mozilla/net/WebSocketChannelParent.h";
include "mozilla/net/WebSocketChannelChild.h";