Bug 1359718 - Get rid of PBlob - part 2 - PBlob, r=smaug, r=kanru

This commit is contained in:
Andrea Marchesini 2017-05-23 18:05:19 +02:00
Родитель 7c4d305b8f
Коммит f512688b0b
40 изменённых файлов: 12 добавлений и 4998 удалений

Просмотреть файл

@ -20,7 +20,6 @@
#include "mozilla/dom/ImageBitmapBinding.h"
#include "mozilla/dom/ImageData.h"
#include "mozilla/dom/ImageDataBinding.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/dom/StructuredClone.h"
#include "mozilla/dom/MessagePort.h"
#include "mozilla/dom/MessagePortBinding.h"

Просмотреть файл

@ -42,8 +42,6 @@
#include "mozilla/dom/ProcessGlobal.h"
#include "mozilla/dom/SameProcessMessageQueue.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/dom/ipc/BlobParent.h"
#include "mozilla/dom/ipc/StructuredCloneData.h"
#include "mozilla/dom/DOMStringList.h"
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"

Просмотреть файл

@ -7,7 +7,6 @@
#include "BroadcastChannelChild.h"
#include "BroadcastChannel.h"
#include "jsapi.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/MessageEvent.h"
#include "mozilla/dom/MessageEventBinding.h"

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,238 +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_dom_ipc_BlobChild_h
#define mozilla_dom_ipc_BlobChild_h
#include "mozilla/Attributes.h"
#include "mozilla/dom/PBlobChild.h"
#include "nsCOMPtr.h"
#include "nsID.h"
class nsIEventTarget;
class nsIRemoteBlob;
class nsString;
namespace mozilla {
namespace ipc {
class PBackgroundChild;
} // namespace ipc
namespace dom {
class Blob;
class BlobImpl;
class ContentChild;
class nsIContentChild;
class BlobChild final
: public PBlobChild
{
typedef mozilla::ipc::PBackgroundChild PBackgroundChild;
class RemoteBlobImpl;
friend class RemoteBlobImpl;
class RemoteBlobSliceImpl;
friend class RemoteBlobSliceImpl;
BlobImpl* mBlobImpl;
RemoteBlobImpl* mRemoteBlobImpl;
// One of these will be null and the other non-null.
PBackgroundChild* mBackgroundManager;
nsCOMPtr<nsIContentChild> mContentManager;
nsCOMPtr<nsIEventTarget> mEventTarget;
nsID mParentID;
bool mOwnsBlobImpl;
public:
class FriendKey;
static void
Startup(const FriendKey& aKey);
// These create functions are called on the sending side.
static BlobChild*
GetOrCreate(nsIContentChild* aManager, BlobImpl* aBlobImpl);
static BlobChild*
GetOrCreate(PBackgroundChild* aManager, BlobImpl* aBlobImpl);
// These create functions are called on the receiving side.
static BlobChild*
Create(nsIContentChild* aManager, const ChildBlobConstructorParams& aParams);
static BlobChild*
Create(PBackgroundChild* aManager,
const ChildBlobConstructorParams& aParams);
static void
Destroy(PBlobChild* aActor)
{
delete static_cast<BlobChild*>(aActor);
}
bool
HasManager() const
{
return mBackgroundManager || mContentManager;
}
PBackgroundChild*
GetBackgroundManager() const
{
return mBackgroundManager;
}
nsIContentChild*
GetContentManager() const
{
return mContentManager;
}
const nsID&
ParentID() const;
// Get the BlobImpl associated with this actor. This may always be called
// on the sending side. It may also be called on the receiving side unless
// this is a "mystery" blob that has not yet received a SetMysteryBlobInfo()
// call.
already_AddRefed<BlobImpl>
GetBlobImpl();
// Use this for files.
bool
SetMysteryBlobInfo(const nsString& aName,
const nsString& aContentType,
uint64_t aLength,
int64_t aLastModifiedDate);
// Use this for non-file blobs.
bool
SetMysteryBlobInfo(const nsString& aContentType, uint64_t aLength);
void
AssertIsOnOwningThread() const
#ifdef DEBUG
;
#else
{ }
#endif
private:
// These constructors are called on the sending side.
BlobChild(nsIContentChild* aManager, BlobImpl* aBlobImpl);
BlobChild(PBackgroundChild* aManager, BlobImpl* aBlobImpl);
BlobChild(nsIContentChild* aManager, BlobChild* aOther);
BlobChild(PBackgroundChild* aManager, BlobChild* aOther, BlobImpl* aBlobImpl);
// These constructors are called on the receiving side.
BlobChild(nsIContentChild* aManager,
const ChildBlobConstructorParams& aParams);
BlobChild(PBackgroundChild* aManager,
const ChildBlobConstructorParams& aParams);
// These constructors are called for slices.
BlobChild(nsIContentChild* aManager,
const nsID& aParentID,
RemoteBlobSliceImpl* aRemoteBlobSliceImpl);
BlobChild(PBackgroundChild* aManager,
const nsID& aParentID,
RemoteBlobSliceImpl* aRemoteBlobSliceImpl);
// Only called by Destroy().
~BlobChild();
void
CommonInit(BlobImpl* aBlobImpl);
void
CommonInit(BlobChild* aOther, BlobImpl* aBlobImpl);
void
CommonInit(const ChildBlobConstructorParams& aParams);
void
CommonInit(const nsID& aParentID, RemoteBlobImpl* aRemoteBlobImpl);
template <class ChildManagerType>
static BlobChild*
GetOrCreateFromImpl(ChildManagerType* aManager, BlobImpl* aBlobImpl);
template <class ChildManagerType>
static BlobChild*
CreateFromParams(ChildManagerType* aManager,
const ChildBlobConstructorParams& aParams);
template <class ChildManagerType>
static BlobChild*
SendSliceConstructor(ChildManagerType* aManager,
RemoteBlobSliceImpl* aRemoteBlobSliceImpl,
const ParentBlobConstructorParams& aParams);
static BlobChild*
MaybeGetActorFromRemoteBlob(nsIRemoteBlob* aRemoteBlob,
nsIContentChild* aManager,
BlobImpl* aBlobImpl);
static BlobChild*
MaybeGetActorFromRemoteBlob(nsIRemoteBlob* aRemoteBlob,
PBackgroundChild* aManager,
BlobImpl* aBlobImpl);
void
NoteDyingRemoteBlobImpl();
nsIEventTarget*
EventTarget() const
{
return mEventTarget;
}
bool
IsOnOwningThread() const;
// These methods are only called by the IPDL message machinery.
virtual void
ActorDestroy(ActorDestroyReason aWhy) override;
virtual mozilla::ipc::IPCResult
RecvCreatedFromKnownBlob() override;
};
// Only let ContentChild call BlobChild::Startup() and ensure that
// ContentChild can't access any other BlobChild internals.
class BlobChild::FriendKey final
{
friend class ContentChild;
private:
FriendKey()
{ }
FriendKey(const FriendKey& /* aOther */)
{ }
public:
~FriendKey()
{ }
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_ipc_BlobChild_h

Просмотреть файл

@ -1,226 +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_dom_ipc_BlobParent_h
#define mozilla_dom_ipc_BlobParent_h
#include "mozilla/Attributes.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/dom/PBlobParent.h"
#include "nsCOMPtr.h"
#include "nsTArray.h"
template <class, class> class nsDataHashtable;
class nsIDHashKey;
class nsIEventTarget;
class nsIRemoteBlob;
template <class> class nsRevocableEventPtr;
class nsString;
namespace mozilla {
class Mutex;
namespace ipc {
class PBackgroundParent;
} // namespace ipc
namespace dom {
class ContentParent;
class BlobImpl;
class nsIContentParent;
class BlobParent final
: public PBlobParent
{
typedef mozilla::ipc::PBackgroundParent PBackgroundParent;
class IDTableEntry;
typedef nsDataHashtable<nsIDHashKey, IDTableEntry*> IDTable;
class RemoteBlobImpl;
struct CreateBlobImplMetadata;
static StaticAutoPtr<IDTable> sIDTable;
static StaticAutoPtr<Mutex> sIDTableMutex;
BlobImpl* mBlobImpl;
RemoteBlobImpl* mRemoteBlobImpl;
// One of these will be null and the other non-null.
PBackgroundParent* mBackgroundManager;
nsCOMPtr<nsIContentParent> mContentManager;
nsCOMPtr<nsIEventTarget> mEventTarget;
RefPtr<IDTableEntry> mIDTableEntry;
bool mOwnsBlobImpl;
public:
class FriendKey;
static void
Startup(const FriendKey& aKey);
// These create functions are called on the sending side.
static BlobParent*
GetOrCreate(nsIContentParent* aManager, BlobImpl* aBlobImpl);
static BlobParent*
GetOrCreate(PBackgroundParent* aManager, BlobImpl* aBlobImpl);
// These create functions are called on the receiving side.
static BlobParent*
Create(nsIContentParent* aManager,
const ParentBlobConstructorParams& aParams);
static BlobParent*
Create(PBackgroundParent* aManager,
const ParentBlobConstructorParams& aParams);
static void
Destroy(PBlobParent* aActor)
{
delete static_cast<BlobParent*>(aActor);
}
static already_AddRefed<BlobImpl>
GetBlobImplForID(const nsID& aID);
bool
HasManager() const
{
return mBackgroundManager || mContentManager;
}
PBackgroundParent*
GetBackgroundManager() const
{
return mBackgroundManager;
}
nsIContentParent*
GetContentManager() const
{
return mContentManager;
}
// Get the BlobImpl associated with this actor.
already_AddRefed<BlobImpl>
GetBlobImpl();
void
AssertIsOnOwningThread() const
#ifdef DEBUG
;
#else
{ }
#endif
private:
// These constructors are called on the sending side.
BlobParent(nsIContentParent* aManager, IDTableEntry* aIDTableEntry);
BlobParent(PBackgroundParent* aManager, IDTableEntry* aIDTableEntry);
// These constructors are called on the receiving side.
BlobParent(nsIContentParent* aManager,
BlobImpl* aBlobImpl,
IDTableEntry* aIDTableEntry);
BlobParent(PBackgroundParent* aManager,
BlobImpl* aBlobImpl,
IDTableEntry* aIDTableEntry);
// Only destroyed by BackgroundParentImpl and ContentParent.
~BlobParent();
void
CommonInit(IDTableEntry* aIDTableEntry);
void
CommonInit(BlobImpl* aBlobImpl, IDTableEntry* aIDTableEntry);
template <class ParentManagerType>
static BlobParent*
GetOrCreateFromImpl(ParentManagerType* aManager,
BlobImpl* aBlobImpl);
template <class ParentManagerType>
static BlobParent*
CreateFromParams(ParentManagerType* aManager,
const ParentBlobConstructorParams& aParams);
template <class ParentManagerType>
static BlobParent*
SendSliceConstructor(ParentManagerType* aManager,
const ParentBlobConstructorParams& aParams,
const ChildBlobConstructorParams& aOtherSideParams);
static BlobParent*
MaybeGetActorFromRemoteBlob(nsIRemoteBlob* aRemoteBlob,
nsIContentParent* aManager);
static BlobParent*
MaybeGetActorFromRemoteBlob(nsIRemoteBlob* aRemoteBlob,
PBackgroundParent* aManager);
void
NoteDyingRemoteBlobImpl();
nsIEventTarget*
EventTarget() const
{
return mEventTarget;
}
bool
IsOnOwningThread() const;
// These methods are only called by the IPDL message machinery.
virtual void
ActorDestroy(ActorDestroyReason aWhy) override;
virtual mozilla::ipc::IPCResult
RecvResolveMystery(const ResolveMysteryParams& aParams) override;
virtual mozilla::ipc::IPCResult
RecvWaitForSliceCreation() override;
virtual mozilla::ipc::IPCResult
RecvGetFileId(int64_t* aFileId) override;
virtual mozilla::ipc::IPCResult
RecvGetFilePath(nsString* aFilePath) override;
};
// Only let ContentParent call BlobParent::Startup() and ensure that
// ContentParent can't access any other BlobParent internals.
class BlobParent::FriendKey final
{
friend class ContentParent;
private:
FriendKey()
{ }
FriendKey(const FriendKey& /* aOther */)
{ }
public:
~FriendKey()
{ }
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_ipc_BlobParent_h

Просмотреть файл

@ -10,9 +10,15 @@
#include "IPCBlobInputStreamParent.h"
#include "IPCBlobInputStreamStorage.h"
#include "mozilla/dom/IPCBlob.h"
#include "mozilla/dom/nsIContentParent.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "StreamBlobImpl.h"
#include "prtime.h"
namespace mozilla {
using namespace ipc;
namespace dom {
namespace IPCBlobUtils {

Просмотреть файл

@ -140,6 +140,7 @@ class PBackgroundParent;
namespace dom {
class IPCBlob;
class nsIContentChild;
class nsIContentParent;

Просмотреть файл

@ -1,51 +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 PContentBridge;
include protocol PFileDescriptorSet;
include protocol PChildToParentStream;
include protocol PParentToChildStream;
include BlobTypes;
include DOMTypes;
include InputStreamParams;
namespace mozilla {
namespace dom {
union ResolveMysteryParams
{
NormalBlobConstructorParams;
FileBlobConstructorParams;
};
sync protocol PBlob
{
manager PBackground or PContent or PContentBridge;
both:
async __delete__();
parent:
async ResolveMystery(ResolveMysteryParams params);
sync WaitForSliceCreation();
// Use only for testing!
sync GetFileId()
returns (int64_t fileId);
sync GetFilePath()
returns (nsString filePath);
child:
// This method must be called by the parent when the PBlobParent is fully
// created in order to release the known blob.
async CreatedFromKnownBlob();
};
} // namespace dom
} // namespace mozilla

Просмотреть файл

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "PendingIPCBlobParent.h"
#include "mozilla/ipc/PBackgroundParent.h"
namespace mozilla {

Просмотреть файл

@ -5,8 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS.mozilla.dom.ipc += [
'BlobChild.h',
'BlobParent.h',
'IPCBlobInputStream.h',
'IPCBlobInputStreamChild.h',
'IPCBlobInputStreamParent.h',
@ -21,7 +19,6 @@ EXPORTS.mozilla.dom += [
]
UNIFIED_SOURCES += [
'Blob.cpp',
'IPCBlobInputStream.cpp',
'IPCBlobInputStreamChild.cpp',
'IPCBlobInputStreamParent.cpp',
@ -34,7 +31,6 @@ UNIFIED_SOURCES += [
IPDL_SOURCES += [
'BlobTypes.ipdlh',
'IPCBlob.ipdlh',
'PBlob.ipdl',
'PIPCBlobInputStream.ipdl',
'PPendingIPCBlob.ipdl',
]

Просмотреть файл

@ -18,26 +18,13 @@
namespace mozilla {
namespace dom {
class BlobChild;
class BlobParent;
} // namespace dom
} // namespace mozilla
class NS_NO_VTABLE nsIRemoteBlob : public nsISupports
{
public:
typedef mozilla::dom::BlobChild BlobChild;
typedef mozilla::dom::BlobParent BlobParent;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IREMOTEBLOB_IID)
virtual BlobChild*
GetBlobChild() = 0;
virtual BlobParent*
GetBlobParent() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIRemoteBlob, NS_IREMOTEBLOB_IID)

Просмотреть файл

@ -38,7 +38,6 @@
#include "mozilla/dom/StructuredCloneHolder.h"
#include "mozilla/dom/StructuredCloneTags.h"
#include "mozilla/dom/indexedDB/PBackgroundIDBSharedTypes.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/ipc/BackgroundChild.h"
#include "mozilla/ipc/PBackgroundSharedTypes.h"
#include "nsCOMPtr.h"

Просмотреть файл

@ -8,7 +8,6 @@
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
#include "mozilla/ipc/InputStreamUtils.h"
#include "base/task.h"
@ -61,13 +60,6 @@ ContentBridgeChild::RecvAsyncMessage(const nsString& aMsg,
return nsIContentChild::RecvAsyncMessage(aMsg, Move(aCpows), aPrincipal, aData);
}
PBlobChild*
ContentBridgeChild::SendPBlobConstructor(PBlobChild* actor,
const BlobConstructorParams& params)
{
return PContentBridgeChild::SendPBlobConstructor(actor, params);
}
bool
ContentBridgeChild::SendPBrowserConstructor(PBrowserChild* aActor,
const TabId& aTabId,
@ -162,18 +154,6 @@ ContentBridgeChild::RecvPBrowserConstructor(PBrowserChild* aActor,
aIsForBrowser);
}
PBlobChild*
ContentBridgeChild::AllocPBlobChild(const BlobConstructorParams& aParams)
{
return nsIContentChild::AllocPBlobChild(aParams);
}
bool
ContentBridgeChild::DeallocPBlobChild(PBlobChild* aActor)
{
return nsIContentChild::DeallocPBlobChild(aActor);
}
PIPCBlobInputStreamChild*
ContentBridgeChild::AllocPIPCBlobInputStreamChild(const nsID& aID,
const uint64_t& aSize)

Просмотреть файл

@ -32,10 +32,6 @@ public:
const IPC::Principal& aPrincipal,
const ClonedMessageData& aData) override;
virtual PBlobChild*
SendPBlobConstructor(PBlobChild* actor,
const BlobConstructorParams& aParams) override;
jsipc::CPOWManager* GetCPOWManager() override;
virtual bool SendPBrowserConstructor(PBrowserChild* aActor,
@ -82,9 +78,6 @@ protected:
virtual mozilla::jsipc::PJavaScriptChild* AllocPJavaScriptChild() override;
virtual bool DeallocPJavaScriptChild(mozilla::jsipc::PJavaScriptChild*) override;
virtual PBlobChild* AllocPBlobChild(const BlobConstructorParams& aParams) override;
virtual bool DeallocPBlobChild(PBlobChild*) override;
virtual PIPCBlobInputStreamChild*
AllocPIPCBlobInputStreamChild(const nsID& aID,
const uint64_t& aSize) override;

Просмотреть файл

@ -87,13 +87,6 @@ ContentBridgeParent::RecvAsyncMessage(const nsString& aMsg,
aPrincipal, aData);
}
PBlobParent*
ContentBridgeParent::SendPBlobConstructor(PBlobParent* actor,
const BlobConstructorParams& params)
{
return PContentBridgeParent::SendPBlobConstructor(actor, params);
}
PBrowserParent*
ContentBridgeParent::SendPBrowserConstructor(PBrowserParent* aActor,
const TabId& aTabId,
@ -118,18 +111,6 @@ ContentBridgeParent::SendPParentToChildStreamConstructor(PParentToChildStreamPar
return PContentBridgeParent::SendPParentToChildStreamConstructor(aActor);
}
PBlobParent*
ContentBridgeParent::AllocPBlobParent(const BlobConstructorParams& aParams)
{
return nsIContentParent::AllocPBlobParent(aParams);
}
bool
ContentBridgeParent::DeallocPBlobParent(PBlobParent* aActor)
{
return nsIContentParent::DeallocPBlobParent(aActor);
}
PIPCBlobInputStreamParent*
ContentBridgeParent::SendPIPCBlobInputStreamConstructor(PIPCBlobInputStreamParent* aActor,
const nsID& aID,

Просмотреть файл

@ -33,10 +33,6 @@ public:
static ContentBridgeParent*
Create(Endpoint<PContentBridgeParent>&& aEndpoint);
virtual PBlobParent*
SendPBlobConstructor(PBlobParent* actor,
const BlobConstructorParams& params) override;
virtual PBrowserParent*
SendPBrowserConstructor(PBrowserParent* aActor,
const TabId& aTabId,
@ -133,11 +129,6 @@ protected:
virtual bool DeallocPBrowserParent(PBrowserParent*) override;
virtual PBlobParent*
AllocPBlobParent(const BlobConstructorParams& aParams) override;
virtual bool DeallocPBlobParent(PBlobParent*) override;
virtual PIPCBlobInputStreamParent*
SendPIPCBlobInputStreamConstructor(PIPCBlobInputStreamParent* aActor,
const nsID& aID,

Просмотреть файл

@ -41,7 +41,6 @@
#include "mozilla/dom/workers/ServiceWorkerManager.h"
#include "mozilla/dom/nsIContentChild.h"
#include "mozilla/dom/URLClassifierChild.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/psm/PSMContentListener.h"
#include "mozilla/hal_sandbox/PHalChild.h"
@ -989,8 +988,6 @@ ContentChild::InitXPCOM(const XPCOMInitData& aXPCOMInit,
MOZ_CRASH("Failed to create PBackgroundChild!");
}
BlobChild::Startup(BlobChild::FriendKey());
nsCOMPtr<nsIConsoleService> svc(do_GetService(NS_CONSOLESERVICE_CONTRACTID));
if (!svc) {
NS_WARNING("Couldn't acquire console service");
@ -1646,12 +1643,6 @@ ContentChild::DeallocPIPCBlobInputStreamChild(PIPCBlobInputStreamChild* aActor)
return nsIContentChild::DeallocPIPCBlobInputStreamChild(aActor);
}
PBlobChild*
ContentChild::AllocPBlobChild(const BlobConstructorParams& aParams)
{
return nsIContentChild::AllocPBlobChild(aParams);
}
mozilla::PRemoteSpellcheckEngineChild *
ContentChild::AllocPRemoteSpellcheckEngineChild()
{
@ -1666,23 +1657,6 @@ ContentChild::DeallocPRemoteSpellcheckEngineChild(PRemoteSpellcheckEngineChild *
return true;
}
bool
ContentChild::DeallocPBlobChild(PBlobChild* aActor)
{
return nsIContentChild::DeallocPBlobChild(aActor);
}
PBlobChild*
ContentChild::SendPBlobConstructor(PBlobChild* aActor,
const BlobConstructorParams& aParams)
{
if (IsShuttingDown()) {
return nullptr;
}
return PContentChild::SendPBlobConstructor(aActor, aParams);
}
PPresentationChild*
ContentChild::AllocPPresentationChild()
{

Просмотреть файл

@ -184,11 +184,6 @@ public:
virtual bool DeallocPBrowserChild(PBrowserChild*) override;
virtual PBlobChild*
AllocPBlobChild(const BlobConstructorParams& aParams) override;
virtual bool DeallocPBlobChild(PBlobChild* aActor) override;
virtual PIPCBlobInputStreamChild*
AllocPIPCBlobInputStreamChild(const nsID& aID,
const uint64_t& aSize) override;
@ -513,10 +508,6 @@ public:
bool IsForBrowser() const { return mIsForBrowser; }
virtual PBlobChild*
SendPBlobConstructor(PBlobChild* actor,
const BlobConstructorParams& params) override;
virtual PFileDescriptorSetChild*
SendPFileDescriptorSetConstructor(const FileDescriptor&) override;

Просмотреть файл

@ -66,7 +66,6 @@
#include "mozilla/dom/quota/QuotaManagerService.h"
#include "mozilla/dom/time/DateCacheCleaner.h"
#include "mozilla/dom/URLClassifierParent.h"
#include "mozilla/dom/ipc/BlobParent.h"
#include "mozilla/embedding/printingui/PrintingParent.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/gfx/GPUProcessManager.h"
@ -631,8 +630,6 @@ ContentParent::StartUp()
mozilla::dom::time::InitializeDateCacheCleaner();
BlobParent::Startup(BlobParent::FriendKey());
BackgroundChild::Startup();
sDisableUnsafeCPOWWarnings = PR_GetEnv("DISABLE_UNSAFE_CPOW_WARNINGS");
@ -2838,18 +2835,6 @@ ContentParent::DeallocPBrowserParent(PBrowserParent* frame)
return nsIContentParent::DeallocPBrowserParent(frame);
}
PBlobParent*
ContentParent::AllocPBlobParent(const BlobConstructorParams& aParams)
{
return nsIContentParent::AllocPBlobParent(aParams);
}
bool
ContentParent::DeallocPBlobParent(PBlobParent* aActor)
{
return nsIContentParent::DeallocPBlobParent(aActor);
}
PIPCBlobInputStreamParent*
ContentParent::AllocPIPCBlobInputStreamParent(const nsID& aID,
const uint64_t& aSize)
@ -2863,21 +2848,6 @@ ContentParent::DeallocPIPCBlobInputStreamParent(PIPCBlobInputStreamParent* aActo
return nsIContentParent::DeallocPIPCBlobInputStreamParent(aActor);
}
mozilla::ipc::IPCResult
ContentParent::RecvPBlobConstructor(PBlobParent* aActor,
const BlobConstructorParams& aParams)
{
const ParentBlobConstructorParams& params = aParams.get_ParentBlobConstructorParams();
if (params.blobParams().type() == AnyBlobConstructorParams::TKnownBlobConstructorParams) {
if (!aActor->SendCreatedFromKnownBlob()) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
return IPC_OK();
}
mozilla::PRemoteSpellcheckEngineParent *
ContentParent::AllocPRemoteSpellcheckEngineParent()
{
@ -3866,13 +3836,6 @@ ContentParent::DoSendAsyncMessage(JSContext* aCx,
return NS_OK;
}
PBlobParent*
ContentParent::SendPBlobConstructor(PBlobParent* aActor,
const BlobConstructorParams& aParams)
{
return PContentParent::SendPBlobConstructor(aActor, aParams);
}
PIPCBlobInputStreamParent*
ContentParent::SendPIPCBlobInputStreamConstructor(PIPCBlobInputStreamParent* aActor,
const nsID& aID,

Просмотреть файл

@ -482,10 +482,6 @@ public:
nsICycleCollectorLogSink* aSink,
nsIDumpGCAndCCLogsCallback* aCallback);
virtual PBlobParent*
SendPBlobConstructor(PBlobParent* aActor,
const BlobConstructorParams& aParams) override;
virtual mozilla::ipc::IPCResult RecvUnregisterRemoteFrame(const TabId& aTabId,
const ContentParentId& aCpId,
const bool& aMarkedDestroying) override;
@ -844,11 +840,6 @@ private:
virtual bool DeallocPBrowserParent(PBrowserParent* frame) override;
virtual PBlobParent*
AllocPBlobParent(const BlobConstructorParams& aParams) override;
virtual bool DeallocPBlobParent(PBlobParent* aActor) override;
virtual PIPCBlobInputStreamParent*
SendPIPCBlobInputStreamConstructor(PIPCBlobInputStreamParent* aActor,
const nsID& aID,
@ -861,10 +852,6 @@ private:
virtual bool
DeallocPIPCBlobInputStreamParent(PIPCBlobInputStreamParent* aActor) override;
virtual mozilla::ipc::IPCResult
RecvPBlobConstructor(PBlobParent* aActor,
const BlobConstructorParams& params) override;
virtual mozilla::ipc::IPCResult RecvNSSU2FTokenIsCompatibleVersion(const nsString& aVersion,
bool* aIsCompatible) override;

Просмотреть файл

@ -4,8 +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 PBlob;
include IPCBlob;
include IPCStream;
include ProtocolTypes;
@ -96,7 +94,7 @@ struct FileBlobConstructorParams
struct SlicedBlobConstructorParams
{
PBlob source;
// broken structure: PBlob source;
nsID id;
uint64_t begin;
uint64_t end;

Просмотреть файл

@ -5,7 +5,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 PBlob;
include protocol PColorPicker;
include protocol PContent;
include protocol PContentBridge;

Просмотреть файл

@ -5,7 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include protocol PBlob;
include protocol PBrowser;
include protocol PCompositorBridge;
include protocol PContentBridge;
@ -282,7 +281,6 @@ struct XPCOMInitData
*/
nested(upto inside_cpow) sync protocol PContent
{
manages PBlob;
manages PBrowser;
manages PContentPermissionRequest;
manages PCycleCollectWithLogs;
@ -339,8 +337,6 @@ both:
IPCTabContext context, uint32_t chromeFlags,
ContentParentId cpId, bool isForBrowser);
async PBlob(BlobConstructorParams params);
async PFileDescriptorSet(FileDescriptor fd);
// For parent->child, aBrowser must be non-null; aOuterWindowID can

Просмотреть файл

@ -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 PBlob;
include protocol PBrowser;
include protocol PContent;
include protocol PJavaScript;
@ -37,7 +36,6 @@ namespace dom {
*/
nested(upto inside_cpow) sync protocol PContentBridge
{
manages PBlob;
manages PBrowser;
manages PFileDescriptorSet;
manages PJavaScript;
@ -76,8 +74,6 @@ both:
IPCTabContext context, uint32_t chromeFlags,
ContentParentId cpId, bool isForBrowser);
async PBlob(BlobConstructorParams params);
async PFileDescriptorSet(FileDescriptor fd);
async AsyncMessage(nsString aMessage, CpowEntry[] aCpows,

Просмотреть файл

@ -11,7 +11,6 @@
#include "mozilla/dom/File.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/dom/ipc/StructuredCloneData.h"
#include "mozilla/ipc/FileDescriptorSetChild.h"
#include "mozilla/ipc/InputStreamUtils.h"
@ -126,43 +125,6 @@ nsIContentChild::DeallocPIPCBlobInputStreamChild(PIPCBlobInputStreamChild* aActo
return true;
}
PBlobChild*
nsIContentChild::AllocPBlobChild(const BlobConstructorParams& aParams)
{
return BlobChild::Create(this, aParams);
}
bool
nsIContentChild::DeallocPBlobChild(PBlobChild* aActor)
{
BlobChild::Destroy(aActor);
return true;
}
BlobChild*
nsIContentChild::GetOrCreateActorForBlob(Blob* aBlob)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aBlob);
RefPtr<BlobImpl> blobImpl = aBlob->Impl();
MOZ_ASSERT(blobImpl);
return GetOrCreateActorForBlobImpl(blobImpl);
}
BlobChild*
nsIContentChild::GetOrCreateActorForBlobImpl(BlobImpl* aImpl)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aImpl);
BlobChild* actor = BlobChild::GetOrCreate(this, aImpl);
NS_ENSURE_TRUE(actor, nullptr);
return actor;
}
PChildToParentStreamChild*
nsIContentChild::AllocPChildToParentStreamChild()
{

Просмотреть файл

@ -42,12 +42,10 @@ class CpowEntry;
namespace dom {
class Blob;
class BlobChild;
class BlobImpl;
class BlobConstructorParams;
class ClonedMessageData;
class IPCTabContext;
class PBlobChild;
class PBrowserChild;
class nsIContentChild : public nsISupports
@ -57,13 +55,6 @@ class nsIContentChild : public nsISupports
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTCHILD_IID)
BlobChild* GetOrCreateActorForBlob(Blob* aBlob);
BlobChild* GetOrCreateActorForBlobImpl(BlobImpl* aImpl);
virtual PBlobChild*
SendPBlobConstructor(PBlobChild* aActor,
const BlobConstructorParams& aParams) = 0;
virtual bool
SendPBrowserConstructor(PBrowserChild* aActor,
const TabId& aTabId,
@ -99,10 +90,6 @@ protected:
const ContentParentId& aCpID,
const bool& aIsForBrowse);
virtual PBlobChild* AllocPBlobChild(const BlobConstructorParams& aParams);
virtual bool DeallocPBlobChild(PBlobChild* aActor);
virtual mozilla::ipc::PIPCBlobInputStreamChild*
AllocPIPCBlobInputStreamChild(const nsID& aID, const uint64_t& aSize);

Просмотреть файл

@ -14,7 +14,6 @@
#include "mozilla/dom/PTabContext.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/dom/ipc/BlobParent.h"
#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
#include "mozilla/dom/ipc/StructuredCloneData.h"
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
@ -205,19 +204,6 @@ nsIContentParent::DeallocPBrowserParent(PBrowserParent* aFrame)
return true;
}
PBlobParent*
nsIContentParent::AllocPBlobParent(const BlobConstructorParams& aParams)
{
return BlobParent::Create(this, aParams);
}
bool
nsIContentParent::DeallocPBlobParent(PBlobParent* aActor)
{
BlobParent::Destroy(aActor);
return true;
}
PIPCBlobInputStreamParent*
nsIContentParent::AllocPIPCBlobInputStreamParent(const nsID& aID,
const uint64_t& aSize)
@ -233,30 +219,6 @@ nsIContentParent::DeallocPIPCBlobInputStreamParent(PIPCBlobInputStreamParent* aA
return true;
}
BlobParent*
nsIContentParent::GetOrCreateActorForBlob(Blob* aBlob)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aBlob);
RefPtr<BlobImpl> blobImpl = aBlob->Impl();
MOZ_ASSERT(blobImpl);
return GetOrCreateActorForBlobImpl(blobImpl);
}
BlobParent*
nsIContentParent::GetOrCreateActorForBlobImpl(BlobImpl* aImpl)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aImpl);
BlobParent* actor = BlobParent::GetOrCreate(this, aImpl);
NS_ENSURE_TRUE(actor, nullptr);
return actor;
}
mozilla::ipc::IPCResult
nsIContentParent::RecvSyncMessage(const nsString& aMsg,
const ClonedMessageData& aData,

Просмотреть файл

@ -44,11 +44,9 @@ namespace dom {
class Blob;
class BlobConstructorParams;
class BlobImpl;
class BlobParent;
class ContentParent;
class ContentBridgeParent;
class IPCTabContext;
class PBlobParent;
class PBrowserParent;
class nsIContentParent : public nsISupports
@ -61,16 +59,9 @@ public:
nsIContentParent();
BlobParent* GetOrCreateActorForBlob(Blob* aBlob);
BlobParent* GetOrCreateActorForBlobImpl(BlobImpl* aImpl);
virtual ContentParentId ChildID() const = 0;
virtual bool IsForBrowser() const = 0;
MOZ_MUST_USE virtual PBlobParent*
SendPBlobConstructor(PBlobParent* aActor,
const BlobConstructorParams& aParams) = 0;
virtual mozilla::ipc::PIPCBlobInputStreamParent*
SendPIPCBlobInputStreamConstructor(mozilla::ipc::PIPCBlobInputStreamParent* aActor,
const nsID& aID,
@ -125,10 +116,6 @@ protected: // IPDL methods
const bool& aIsForBrowser);
virtual bool DeallocPBrowserParent(PBrowserParent* frame);
virtual PBlobParent* AllocPBlobParent(const BlobConstructorParams& aParams);
virtual bool DeallocPBlobParent(PBlobParent* aActor);
virtual mozilla::ipc::PIPCBlobInputStreamParent*
AllocPIPCBlobInputStreamParent(const nsID& aID, const uint64_t& aSize);

Просмотреть файл

@ -7,8 +7,6 @@
#include "MessagePort.h"
#include "MessagePortChild.h"
#include "MessagePortParent.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/dom/ipc/BlobParent.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/PMessagePort.h"
#include "mozilla/ipc/BackgroundChild.h"

Просмотреть файл

@ -20,7 +20,6 @@ namespace dom {
class BlobImpl;
class ContentChild;
class ContentParent;
class PBlobChild;
} // namespace dom
@ -71,14 +70,6 @@ public:
static PBackgroundChild*
SynchronouslyCreateForCurrentThread();
static mozilla::dom::PBlobChild*
GetOrCreateActorForBlob(PBackgroundChild* aBackgroundActor,
nsIDOMBlob* aBlob);
static mozilla::dom::PBlobChild*
GetOrCreateActorForBlobImpl(PBackgroundChild* aBackgroundActor,
mozilla::dom::BlobImpl* aBlobImpl);
// See above.
static void
CloseForCurrentThread();

Просмотреть файл

@ -16,14 +16,12 @@
#include "mozilla/media/MediaChild.h"
#include "mozilla/Assertions.h"
#include "mozilla/SchedulerGroup.h"
#include "mozilla/dom/PBlobChild.h"
#include "mozilla/dom/PFileSystemRequestChild.h"
#include "mozilla/dom/FileSystemTaskBase.h"
#include "mozilla/dom/asmjscache/AsmJSCache.h"
#include "mozilla/dom/cache/ActorUtils.h"
#include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h"
#include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsChild.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/dom/ipc/IPCBlobInputStreamChild.h"
#include "mozilla/dom/ipc/PendingIPCBlobChild.h"
#include "mozilla/dom/quota/PQuotaChild.h"
@ -203,24 +201,6 @@ BackgroundChildImpl::DeallocPBackgroundIndexedDBUtilsChild(
return true;
}
auto
BackgroundChildImpl::AllocPBlobChild(const BlobConstructorParams& aParams)
-> PBlobChild*
{
MOZ_ASSERT(aParams.type() != BlobConstructorParams::T__None);
return mozilla::dom::BlobChild::Create(this, aParams);
}
bool
BackgroundChildImpl::DeallocPBlobChild(PBlobChild* aActor)
{
MOZ_ASSERT(aActor);
mozilla::dom::BlobChild::Destroy(aActor);
return true;
}
PPendingIPCBlobChild*
BackgroundChildImpl::AllocPPendingIPCBlobChild(const IPCBlob& aBlob)
{

Просмотреть файл

@ -70,12 +70,6 @@ protected:
DeallocPBackgroundIndexedDBUtilsChild(PBackgroundIndexedDBUtilsChild* aActor)
override;
virtual PBlobChild*
AllocPBlobChild(const BlobConstructorParams& aParams) override;
virtual bool
DeallocPBlobChild(PBlobChild* aActor) override;
virtual PPendingIPCBlobChild*
AllocPPendingIPCBlobChild(const IPCBlob& aBlob) override;

Просмотреть файл

@ -24,8 +24,6 @@
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/dom/ipc/BlobParent.h"
#include "mozilla/ipc/ProtocolTypes.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
@ -810,24 +808,6 @@ BackgroundParent::GetContentParent(PBackgroundParent* aBackgroundActor)
return ParentImpl::GetContentParent(aBackgroundActor);
}
// static
PBlobParent*
BackgroundParent::GetOrCreateActorForBlobImpl(
PBackgroundParent* aBackgroundActor,
BlobImpl* aBlobImpl)
{
AssertIsOnBackgroundThread();
MOZ_ASSERT(aBackgroundActor);
MOZ_ASSERT(aBlobImpl);
BlobParent* actor = BlobParent::GetOrCreate(aBackgroundActor, aBlobImpl);
if (NS_WARN_IF(!actor)) {
return nullptr;
}
return actor;
}
// static
intptr_t
BackgroundParent::GetRawContentParentForComparison(
@ -877,39 +857,6 @@ BackgroundChild::SynchronouslyCreateForCurrentThread()
return ChildImpl::SynchronouslyCreateForCurrentThread();
}
// static
PBlobChild*
BackgroundChild::GetOrCreateActorForBlob(PBackgroundChild* aBackgroundActor,
nsIDOMBlob* aBlob)
{
MOZ_ASSERT(aBlob);
RefPtr<BlobImpl> blobImpl = static_cast<Blob*>(aBlob)->Impl();
MOZ_ASSERT(blobImpl);
return GetOrCreateActorForBlobImpl(aBackgroundActor, blobImpl);
}
// static
PBlobChild*
BackgroundChild::GetOrCreateActorForBlobImpl(PBackgroundChild* aBackgroundActor,
BlobImpl* aBlobImpl)
{
MOZ_ASSERT(aBackgroundActor);
MOZ_ASSERT(aBlobImpl);
MOZ_ASSERT(GetForCurrentThread(),
"BackgroundChild not created on this thread yet!");
MOZ_ASSERT(aBackgroundActor == GetForCurrentThread(),
"BackgroundChild is bound to a different thread!");
BlobChild* actor = BlobChild::GetOrCreate(aBackgroundActor, aBlobImpl);
if (NS_WARN_IF(!actor)) {
return nullptr;
}
return actor;
}
// static
void
BackgroundChild::CloseForCurrentThread()

Просмотреть файл

@ -18,7 +18,6 @@ namespace dom {
class BlobImpl;
class ContentParent;
class PBlobParent;
} // namespace dom
@ -58,10 +57,6 @@ public:
static already_AddRefed<ContentParent>
GetContentParent(PBackgroundParent* aBackgroundActor);
static mozilla::dom::PBlobParent*
GetOrCreateActorForBlobImpl(PBackgroundParent* aBackgroundActor,
BlobImpl* aBlobImpl);
// Get a value that represents the ContentParent associated with the parent
// actor for comparison. The value is not guaranteed to uniquely identify the
// ContentParent after the ContentParent has died. This function may only be

Просмотреть файл

@ -19,7 +19,6 @@
#include "mozilla/dom/FileSystemRequestParent.h"
#include "mozilla/dom/GamepadEventChannelParent.h"
#include "mozilla/dom/GamepadTestChannelParent.h"
#include "mozilla/dom/PBlobParent.h"
#include "mozilla/dom/PGamepadEventChannelParent.h"
#include "mozilla/dom/PGamepadTestChannelParent.h"
#include "mozilla/dom/MessagePortParent.h"
@ -27,7 +26,6 @@
#include "mozilla/dom/asmjscache/AsmJSCache.h"
#include "mozilla/dom/cache/ActorUtils.h"
#include "mozilla/dom/indexedDB/ActorsParent.h"
#include "mozilla/dom/ipc/BlobParent.h"
#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
#include "mozilla/dom/ipc/PendingIPCBlobParent.h"
#include "mozilla/dom/quota/ActorsParent.h"
@ -243,33 +241,6 @@ BackgroundParentImpl::RecvFlushPendingFileDeletions()
return IPC_OK();
}
auto
BackgroundParentImpl::AllocPBlobParent(const BlobConstructorParams& aParams)
-> PBlobParent*
{
AssertIsInMainProcess();
AssertIsOnBackgroundThread();
if (NS_WARN_IF(aParams.type() !=
BlobConstructorParams::TParentBlobConstructorParams)) {
ASSERT_UNLESS_FUZZING();
return nullptr;
}
return mozilla::dom::BlobParent::Create(this, aParams);
}
bool
BackgroundParentImpl::DeallocPBlobParent(PBlobParent* aActor)
{
AssertIsInMainProcess();
AssertIsOnBackgroundThread();
MOZ_ASSERT(aActor);
mozilla::dom::BlobParent::Destroy(aActor);
return true;
}
PPendingIPCBlobParent*
BackgroundParentImpl::AllocPPendingIPCBlobParent(const IPCBlob& aBlob)
{
@ -305,21 +276,6 @@ BackgroundParentImpl::DeallocPIPCBlobInputStreamParent(PIPCBlobInputStreamParent
return true;
}
mozilla::ipc::IPCResult
BackgroundParentImpl::RecvPBlobConstructor(PBlobParent* aActor,
const BlobConstructorParams& aParams)
{
const ParentBlobConstructorParams& params = aParams;
if (params.blobParams().type() == AnyBlobConstructorParams::TKnownBlobConstructorParams) {
if (!aActor->SendCreatedFromKnownBlob()) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
return IPC_OK();
}
PFileDescriptorSetParent*
BackgroundParentImpl::AllocPFileDescriptorSetParent(
const FileDescriptor& aFileDescriptor)

Просмотреть файл

@ -63,12 +63,6 @@ protected:
virtual mozilla::ipc::IPCResult
RecvFlushPendingFileDeletions() override;
virtual PBlobParent*
AllocPBlobParent(const BlobConstructorParams& aParams) override;
virtual bool
DeallocPBlobParent(PBlobParent* aActor) override;
virtual PPendingIPCBlobParent*
AllocPPendingIPCBlobParent(const IPCBlob& aBlob) override;
@ -82,10 +76,6 @@ protected:
virtual bool
DeallocPIPCBlobInputStreamParent(PIPCBlobInputStreamParent* aActor) override;
virtual mozilla::ipc::IPCResult
RecvPBlobConstructor(PBlobParent* aActor,
const BlobConstructorParams& params) override;
virtual PFileDescriptorSetParent*
AllocPFileDescriptorSetParent(const FileDescriptor& aFileDescriptor)
override;

Просмотреть файл

@ -10,8 +10,6 @@
#include "mozilla/Assertions.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/ipc/BlobChild.h"
#include "mozilla/dom/ipc/BlobParent.h"
#include "mozilla/dom/ipc/IPCBlobInputStream.h"
#include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
#include "nsComponentManagerUtils.h"
@ -103,28 +101,9 @@ InputStreamHelper::DeserializeInputStream(const InputStreamParams& aParams,
// When the input stream already exists in this process, all we need to do
// is retrieve the original instead of sending any data over the wire.
case InputStreamParams::TRemoteInputStreamParams: {
if (NS_WARN_IF(!XRE_IsParentProcess())) {
return nullptr;
}
const nsID& id = aParams.get_RemoteInputStreamParams().id();
RefPtr<BlobImpl> blobImpl = BlobParent::GetBlobImplForID(id);
MOZ_ASSERT(blobImpl, "Invalid blob contents");
// If fetching the internal stream fails, we ignore it and return a
// null stream.
ErrorResult rv;
nsCOMPtr<nsIInputStream> stream;
blobImpl->GetInternalStream(getter_AddRefs(stream), rv);
if (NS_WARN_IF(rv.Failed()) || !stream) {
NS_WARNING("Couldn't obtain a valid stream from the blob");
rv.SuppressException();
}
return stream.forget();
}
case InputStreamParams::TRemoteInputStreamParams:
// Thi is broken!
return nullptr;
case InputStreamParams::TSameProcessInputStreamParams: {
MOZ_ASSERT(aFileDescriptors.IsEmpty());

Просмотреть файл

@ -6,7 +6,6 @@ include protocol PAsmJSCacheEntry;
include protocol PBackgroundIDBFactory;
include protocol PBackgroundIndexedDBUtils;
include protocol PBackgroundTest;
include protocol PBlob;
include protocol PBroadcastChannel;
include protocol PCache;
include protocol PCacheStorage;
@ -54,7 +53,6 @@ sync protocol PBackground
manages PBackgroundIDBFactory;
manages PBackgroundIndexedDBUtils;
manages PBackgroundTest;
manages PBlob;
manages PBroadcastChannel;
manages PCache;
manages PCacheStorage;
@ -130,8 +128,6 @@ child:
async PPendingIPCBlob(IPCBlob blob);
both:
async PBlob(BlobConstructorParams params);
async PFileDescriptorSet(FileDescriptor fd);
};

Просмотреть файл

@ -807,12 +807,6 @@ description =
# The rest
[PHeapSnapshotTempFileHelper::OpenHeapSnapshotTempFile]
description =
[PBlob::WaitForSliceCreation]
description =
[PBlob::GetFileId]
description =
[PBlob::GetFilePath]
description =
[PBackgroundMutableFile::GetFileId]
description =
[PBackgroundIndexedDBUtils::GetFileReferences]