diff --git a/dom/base/StructuredCloneHolder.cpp b/dom/base/StructuredCloneHolder.cpp index 2240a1e5042e..fa7eee05ac6d 100644 --- a/dom/base/StructuredCloneHolder.cpp +++ b/dom/base/StructuredCloneHolder.cpp @@ -483,12 +483,6 @@ bool WriteBlob(JSStructuredCloneWriter* aWriter, Blob* aBlob, MOZ_ASSERT(aBlob); MOZ_ASSERT(aHolder); - if (JS_GetStructuredCloneScope(aWriter) != - JS::StructuredCloneScope::SameProcessSameThread && - !aBlob->Impl()->MayBeClonedToOtherThreads()) { - return false; - } - RefPtr blobImpl = aBlob->Impl(); // We store the position of the blobImpl in the array as index. diff --git a/dom/base/UseCounters.conf b/dom/base/UseCounters.conf index 6633fe4d8f46..6fb7efcadd10 100644 --- a/dom/base/UseCounters.conf +++ b/dom/base/UseCounters.conf @@ -60,7 +60,6 @@ attribute OfflineResourceList.onobsolete // Non-standard IndexedDB API method IDBDatabase.createMutableFile method IDBMutableFile.open -method IDBMutableFile.getFile // DataTransfer API (gecko-only methods) method DataTransfer.addElement diff --git a/dom/console/Console.cpp b/dom/console/Console.cpp index ee3bf5b8344a..1891d59f49b0 100644 --- a/dom/console/Console.cpp +++ b/dom/console/Console.cpp @@ -310,8 +310,7 @@ class ConsoleRunnable : public StructuredCloneHolderBase { bool CustomWriteHandler(JSContext* aCx, JSStructuredCloneWriter* aWriter, JS::Handle aObj) override { RefPtr blob; - if (NS_SUCCEEDED(UNWRAP_OBJECT(Blob, aObj, blob)) && - blob->Impl()->MayBeClonedToOtherThreads()) { + if (NS_SUCCEEDED(UNWRAP_OBJECT(Blob, aObj, blob))) { if (NS_WARN_IF(!JS_WriteUint32Pair(aWriter, CONSOLE_TAG_BLOB, mClonedData.mBlobs.Length()))) { return false; diff --git a/dom/file/BlobImpl.h b/dom/file/BlobImpl.h index a185713516ff..6a89f4a1e7c3 100644 --- a/dom/file/BlobImpl.h +++ b/dom/file/BlobImpl.h @@ -105,9 +105,6 @@ class BlobImpl : public nsISupports { // file is a directory. virtual bool IsDirectory() const { return false; } - // True if this implementation can be sent to other threads. - virtual bool MayBeClonedToOtherThreads() const { return true; } - protected: virtual ~BlobImpl() {} }; diff --git a/dom/file/MultipartBlobImpl.cpp b/dom/file/MultipartBlobImpl.cpp index ebb8205b8e2b..1e2014f73efa 100644 --- a/dom/file/MultipartBlobImpl.cpp +++ b/dom/file/MultipartBlobImpl.cpp @@ -283,16 +283,6 @@ void MultipartBlobImpl::SetLengthAndModifiedDate(ErrorResult& aRv) { } } -bool MultipartBlobImpl::MayBeClonedToOtherThreads() const { - for (uint32_t i = 0; i < mBlobImpls.Length(); ++i) { - if (!mBlobImpls[i]->MayBeClonedToOtherThreads()) { - return false; - } - } - - return true; -} - size_t MultipartBlobImpl::GetAllocationSize() const { FallibleTArray visitedBlobs; diff --git a/dom/file/MultipartBlobImpl.h b/dom/file/MultipartBlobImpl.h index 704c685c7783..2377f334d76a 100644 --- a/dom/file/MultipartBlobImpl.h +++ b/dom/file/MultipartBlobImpl.h @@ -61,8 +61,6 @@ class MultipartBlobImpl final : public BaseBlobImpl { void SetName(const nsAString& aName) { mName = aName; } - virtual bool MayBeClonedToOtherThreads() const override; - size_t GetAllocationSize() const override; size_t GetAllocationSize( FallibleTArray& aVisitedBlobImpls) const override; diff --git a/dom/file/ipc/PPendingIPCBlob.ipdl b/dom/file/ipc/PPendingIPCBlob.ipdl deleted file mode 100644 index ae7e65c35fcb..000000000000 --- a/dom/file/ipc/PPendingIPCBlob.ipdl +++ /dev/null @@ -1,42 +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 IPCBlob; - -namespace mozilla { -namespace dom { - -// IndexedDB and FileHandle do not know all the Blob/File properties when they -// create a IPCBlob. For this reason, they need to use this simple protocol. -// When the information is known, they send a __delete__ message with the -// pending data. - -// This contains any extra bit for making a File out of a Blob. -struct PendingIPCFileData -{ - nsString name; - int64_t lastModified; -}; - -struct PendingIPCBlobData -{ - nsString type; - uint64_t size; - - // Nothing() is used for Blob - PendingIPCFileData? file; -}; - -protocol PPendingIPCBlob -{ - manager PBackground; - -parent: - async __delete__(PendingIPCBlobData aData); -}; - -} // namespace dom -} // namespace mozilla diff --git a/dom/file/ipc/PendingIPCBlobChild.cpp b/dom/file/ipc/PendingIPCBlobChild.cpp deleted file mode 100644 index 3c4fc17818ee..000000000000 --- a/dom/file/ipc/PendingIPCBlobChild.cpp +++ /dev/null @@ -1,48 +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 "PendingIPCBlobChild.h" - -namespace mozilla { -namespace dom { - -PendingIPCBlobChild::PendingIPCBlobChild(const IPCBlob& aBlob) { - mBlobImpl = IPCBlobUtils::Deserialize(aBlob); - MOZ_ASSERT(mBlobImpl); -} - -PendingIPCBlobChild::~PendingIPCBlobChild() {} - -already_AddRefed PendingIPCBlobChild::SetPendingInfoAndDeleteActor( - const nsString& aName, const nsString& aContentType, uint64_t aLength, - int64_t aLastModifiedDate) { - RefPtr blobImpl; - blobImpl.swap(mBlobImpl); - - blobImpl->SetLazyData(aName, aContentType, aLength, aLastModifiedDate); - - PendingIPCFileData fileData(nsString(aName), aLastModifiedDate); - PendingIPCBlobData blobData(nsString(aContentType), aLength, Some(fileData)); - Unused << Send__delete__(this, blobData); - - return blobImpl.forget(); -} - -already_AddRefed PendingIPCBlobChild::SetPendingInfoAndDeleteActor( - const nsString& aContentType, uint64_t aLength) { - RefPtr blobImpl; - blobImpl.swap(mBlobImpl); - - blobImpl->SetLazyData(VoidString(), aContentType, aLength, INT64_MAX); - - PendingIPCBlobData data(nsString(aContentType), aLength, Nothing()); - Unused << Send__delete__(this, data); - - return blobImpl.forget(); -} - -} // namespace dom -} // namespace mozilla diff --git a/dom/file/ipc/PendingIPCBlobChild.h b/dom/file/ipc/PendingIPCBlobChild.h deleted file mode 100644 index f7c33f9f1187..000000000000 --- a/dom/file/ipc/PendingIPCBlobChild.h +++ /dev/null @@ -1,42 +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_PendingIPCBlobChild_h -#define mozilla_dom_PendingIPCBlobChild_h - -#include "mozilla/dom/PPendingIPCBlob.h" -#include "mozilla/dom/PPendingIPCBlobChild.h" - -namespace mozilla { -namespace dom { - -class BlobImpl; - -class PendingIPCBlobChild final : public PPendingIPCBlobChild { - public: - explicit PendingIPCBlobChild(const IPCBlob& aBlob); - - // After calling one of the following method, the actor will be deleted. - - // For File. - already_AddRefed SetPendingInfoAndDeleteActor( - const nsString& aName, const nsString& aContentType, uint64_t aLength, - int64_t aLastModifiedDate); - - // For Blob. - already_AddRefed SetPendingInfoAndDeleteActor( - const nsString& aContentType, uint64_t aLength); - - private: - ~PendingIPCBlobChild(); - - RefPtr mBlobImpl; -}; - -} // namespace dom -} // namespace mozilla - -#endif // mozilla_dom_PendingIPCBlobChild_h diff --git a/dom/file/ipc/PendingIPCBlobParent.cpp b/dom/file/ipc/PendingIPCBlobParent.cpp deleted file mode 100644 index a0314fc4a662..000000000000 --- a/dom/file/ipc/PendingIPCBlobParent.cpp +++ /dev/null @@ -1,54 +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 "PendingIPCBlobParent.h" -#include "mozilla/ipc/PBackgroundParent.h" - -namespace mozilla { - -using namespace ipc; - -namespace dom { - -/* static */ -PendingIPCBlobParent* PendingIPCBlobParent::Create(PBackgroundParent* aManager, - BlobImpl* aBlobImpl) { - MOZ_ASSERT(aManager); - MOZ_ASSERT(aBlobImpl); - - IPCBlob ipcBlob; - nsresult rv = IPCBlobUtils::Serialize(aBlobImpl, aManager, ipcBlob); - if (NS_WARN_IF(NS_FAILED(rv))) { - return nullptr; - } - - PendingIPCBlobParent* actor = new PendingIPCBlobParent(aBlobImpl); - if (!aManager->SendPPendingIPCBlobConstructor(actor, ipcBlob)) { - // The actor will be deleted by the manager. - return nullptr; - } - - return actor; -} - -PendingIPCBlobParent::PendingIPCBlobParent(BlobImpl* aBlobImpl) - : mBlobImpl(aBlobImpl) {} - -IPCResult PendingIPCBlobParent::Recv__delete__( - const PendingIPCBlobData& aData) { - if (aData.file().isNothing()) { - mBlobImpl->SetLazyData(VoidString(), aData.type(), aData.size(), INT64_MAX); - } else { - const PendingIPCFileData& fileData = aData.file().ref(); - mBlobImpl->SetLazyData(fileData.name(), aData.type(), aData.size(), - fileData.lastModified()); - } - - return IPC_OK(); -} - -} // namespace dom -} // namespace mozilla diff --git a/dom/file/ipc/PendingIPCBlobParent.h b/dom/file/ipc/PendingIPCBlobParent.h deleted file mode 100644 index 04a7ad7e8d3b..000000000000 --- a/dom/file/ipc/PendingIPCBlobParent.h +++ /dev/null @@ -1,41 +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_PendingIPCBlobParent_h -#define mozilla_dom_PendingIPCBlobParent_h - -#include "mozilla/dom/PPendingIPCBlobParent.h" - -namespace mozilla { - -namespace ipc { -class PBackgroundParent; -} - -namespace dom { - -class BlobImpl; - -class PendingIPCBlobParent final : public PPendingIPCBlobParent { - public: - static PendingIPCBlobParent* Create(PBackgroundParent* aManager, - BlobImpl* aBlobImpl); - - void ActorDestroy(ActorDestroyReason aWhy) override {} - - mozilla::ipc::IPCResult Recv__delete__( - const PendingIPCBlobData& aData) override; - - private: - explicit PendingIPCBlobParent(BlobImpl* aBlobImpl); - - RefPtr mBlobImpl; -}; - -} // namespace dom -} // namespace mozilla - -#endif // mozilla_dom_PendingIPCBlobParent_h diff --git a/dom/file/ipc/moz.build b/dom/file/ipc/moz.build index 665dc0640461..a04659ff0015 100644 --- a/dom/file/ipc/moz.build +++ b/dom/file/ipc/moz.build @@ -21,8 +21,6 @@ EXPORTS.mozilla.dom += [ 'IPCBlobInputStreamParent.h', 'IPCBlobInputStreamStorage.h', 'IPCBlobUtils.h', - 'PendingIPCBlobChild.h', - 'PendingIPCBlobParent.h', 'TemporaryIPCBlobChild.h', 'TemporaryIPCBlobParent.h', ] @@ -36,8 +34,6 @@ UNIFIED_SOURCES += [ 'IPCBlobInputStreamStorage.cpp', 'IPCBlobInputStreamThread.cpp', 'IPCBlobUtils.cpp', - 'PendingIPCBlobChild.cpp', - 'PendingIPCBlobParent.cpp', 'TemporaryIPCBlobChild.cpp', 'TemporaryIPCBlobParent.cpp', ] @@ -47,7 +43,6 @@ IPDL_SOURCES += [ 'IPCBlob.ipdlh', 'PFileCreator.ipdl', 'PIPCBlobInputStream.ipdl', - 'PPendingIPCBlob.ipdl', 'PTemporaryIPCBlob.ipdl', ] diff --git a/dom/filehandle/ActorsParent.cpp b/dom/filehandle/ActorsParent.cpp index 7d9b5b49b9bd..f31bdcdfb25b 100644 --- a/dom/filehandle/ActorsParent.cpp +++ b/dom/filehandle/ActorsParent.cpp @@ -16,7 +16,6 @@ #include "mozilla/dom/indexedDB/ActorsParent.h" #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseParent.h" #include "mozilla/dom/IPCBlobUtils.h" -#include "mozilla/dom/PendingIPCBlobParent.h" #include "mozilla/dom/quota/MemoryOutputStream.h" #include "nsAutoPtr.h" #include "nsComponentManagerUtils.h" @@ -572,20 +571,6 @@ class FlushOp final : public NormalFileHandleOp { virtual void GetResponse(FileRequestResponse& aResponse) override; }; -class GetFileOp final : public GetMetadataOp { - friend class FileHandle; - - PBackgroundParent* mBackgroundParent; - - private: - // Only created by FileHandle. - GetFileOp(FileHandle* aFileHandle, const FileRequestParams& aParams); - - ~GetFileOp() {} - - virtual void GetResponse(FileRequestResponse& aResponse) override; -}; - namespace { /******************************************************************************* @@ -1471,10 +1456,6 @@ bool FileHandle::VerifyRequestParams(const FileRequestParams& aParams) const { break; } - case FileRequestParams::TFileRequestGetFileParams: { - break; - } - default: MOZ_CRASH("Should never get here!"); } @@ -1631,10 +1612,6 @@ PBackgroundFileRequestParent* FileHandle::AllocPBackgroundFileRequestParent( actor = new FlushOp(this, aParams); break; - case FileRequestParams::TFileRequestGetFileParams: - actor = new GetFileOp(this, aParams); - break; - default: MOZ_CRASH("Should never get here!"); } @@ -2187,33 +2164,5 @@ void FlushOp::GetResponse(FileRequestResponse& aResponse) { aResponse = FileRequestFlushResponse(); } -GetFileOp::GetFileOp(FileHandle* aFileHandle, const FileRequestParams& aParams) - : GetMetadataOp(aFileHandle, FileRequestGetMetadataParams(true, true)), - mBackgroundParent(aFileHandle->GetBackgroundParent()) { - MOZ_ASSERT(aParams.type() == FileRequestParams::TFileRequestGetFileParams); - MOZ_ASSERT(mBackgroundParent); -} - -void GetFileOp::GetResponse(FileRequestResponse& aResponse) { - AssertIsOnOwningThread(); - - RefPtr blobImpl = mFileHandle->GetMutableFile()->CreateBlobImpl(); - MOZ_ASSERT(blobImpl); - - PendingIPCBlobParent* actor = - PendingIPCBlobParent::Create(mBackgroundParent, blobImpl); - if (NS_WARN_IF(!actor)) { - // This can only fail if the child has crashed. - aResponse = NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR; - return; - } - - FileRequestGetFileResponse response; - response.fileParent() = actor; - response.metadata() = mMetadata; - - aResponse = response; -} - } // namespace dom } // namespace mozilla diff --git a/dom/filehandle/PBackgroundFileHandle.ipdl b/dom/filehandle/PBackgroundFileHandle.ipdl index 0eecf51c9a75..82863f338a6d 100644 --- a/dom/filehandle/PBackgroundFileHandle.ipdl +++ b/dom/filehandle/PBackgroundFileHandle.ipdl @@ -58,10 +58,6 @@ struct FileRequestFlushParams { }; -struct FileRequestGetFileParams -{ -}; - union FileRequestParams { FileRequestGetMetadataParams; @@ -69,7 +65,6 @@ union FileRequestParams FileRequestWriteParams; FileRequestTruncateParams; FileRequestFlushParams; - FileRequestGetFileParams; }; protocol PBackgroundFileHandle diff --git a/dom/filehandle/PBackgroundFileRequest.ipdl b/dom/filehandle/PBackgroundFileRequest.ipdl index f5a1adc4ff67..bac9843a457e 100644 --- a/dom/filehandle/PBackgroundFileRequest.ipdl +++ b/dom/filehandle/PBackgroundFileRequest.ipdl @@ -3,7 +3,6 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ include protocol PBackgroundFileHandle; -include protocol PPendingIPCBlob; using struct mozilla::void_t from "ipc/IPCMessageUtils.h"; @@ -39,12 +38,6 @@ struct FileRequestFlushResponse { }; -struct FileRequestGetFileResponse -{ - PPendingIPCBlob file; - FileRequestMetadata metadata; -}; - union FileRequestResponse { nsresult; @@ -53,7 +46,6 @@ union FileRequestResponse FileRequestWriteResponse; FileRequestTruncateResponse; FileRequestFlushResponse; - FileRequestGetFileResponse; }; protocol PBackgroundFileRequest diff --git a/dom/indexedDB/ActorsChild.cpp b/dom/indexedDB/ActorsChild.cpp index 9f9e73165d24..f024d8b05060 100644 --- a/dom/indexedDB/ActorsChild.cpp +++ b/dom/indexedDB/ActorsChild.cpp @@ -7,7 +7,6 @@ #include "ActorsChild.h" #include "BackgroundChildImpl.h" -#include "FileSnapshot.h" #include "IDBDatabase.h" #include "IDBEvents.h" #include "IDBFactory.h" @@ -32,7 +31,6 @@ #include "mozilla/dom/BrowserChild.h" #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseFileChild.h" #include "mozilla/dom/IPCBlobUtils.h" -#include "mozilla/dom/PendingIPCBlobChild.h" #include "mozilla/dom/WorkerPrivate.h" #include "mozilla/dom/WorkerRunnable.h" #include "mozilla/Encoding.h" @@ -1209,32 +1207,6 @@ class MOZ_STACK_CLASS FileHandleResultHelper final } }; -MOZ_MUST_USE RefPtr ConvertActorToFile( - IDBFileHandle* aFileHandle, const FileRequestGetFileResponse& aResponse) { - auto* const actor = static_cast(aResponse.fileChild()); - - IDBMutableFile* mutableFile = aFileHandle->GetMutableFile(); - MOZ_ASSERT(mutableFile); - - const FileRequestMetadata& metadata = aResponse.metadata(); - - const Maybe& size = metadata.size(); - MOZ_ASSERT(size.isSome()); - - const Maybe& lastModified = metadata.lastModified(); - MOZ_ASSERT(lastModified.isSome()); - - const RefPtr blobImpl = actor->SetPendingInfoAndDeleteActor( - mutableFile->Name(), mutableFile->Type(), size.value(), - lastModified.value()); - MOZ_ASSERT(blobImpl); - - const RefPtr blobImplSnapshot = - new BlobImplSnapshot(blobImpl, static_cast(aFileHandle)); - - return File::Create(mutableFile->GetOwnerGlobal(), blobImplSnapshot); -} - void DispatchFileHandleErrorEvent(IDBFileRequest* aFileRequest, nsresult aErrorCode, IDBFileHandle* aFileHandle) { @@ -3959,17 +3931,6 @@ void BackgroundFileRequestChild::HandleResponse(nsresult aResponse) { DispatchFileHandleErrorEvent(mFileRequest, aResponse, mFileHandle); } -void BackgroundFileRequestChild::HandleResponse( - const FileRequestGetFileResponse& aResponse) { - AssertIsOnOwningThread(); - - RefPtr file = ConvertActorToFile(mFileHandle, aResponse); - - FileHandleResultHelper helper(mFileRequest, mFileHandle, file); - - DispatchFileHandleSuccessEvent(&helper); -} - void BackgroundFileRequestChild::HandleResponse(const nsCString& aResponse) { AssertIsOnOwningThread(); @@ -4031,10 +3992,6 @@ mozilla::ipc::IPCResult BackgroundFileRequestChild::Recv__delete__( HandleResponse(aResponse.get_nsresult()); break; - case FileRequestResponse::TFileRequestGetFileResponse: - HandleResponse(aResponse.get_FileRequestGetFileResponse()); - break; - case FileRequestResponse::TFileRequestReadResponse: HandleResponse(aResponse.get_FileRequestReadResponse().data()); break; diff --git a/dom/indexedDB/ActorsChild.h b/dom/indexedDB/ActorsChild.h index 2cbde3c5e636..b43afdb066f3 100644 --- a/dom/indexedDB/ActorsChild.h +++ b/dom/indexedDB/ActorsChild.h @@ -822,8 +822,6 @@ class BackgroundFileRequestChild final : public PBackgroundFileRequestChild { void HandleResponse(nsresult aResponse); - void HandleResponse(const FileRequestGetFileResponse& aResponse); - void HandleResponse(const nsCString& aResponse); void HandleResponse(const FileRequestMetadata& aResponse); diff --git a/dom/indexedDB/FileSnapshot.cpp b/dom/indexedDB/FileSnapshot.cpp deleted file mode 100644 index 8b9ac9fd1de9..000000000000 --- a/dom/indexedDB/FileSnapshot.cpp +++ /dev/null @@ -1,407 +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 "FileSnapshot.h" - -#include "IDBDatabase.h" -#include "IDBFileHandle.h" -#include "IDBMutableFile.h" -#include "mozilla/Assertions.h" -#include "mozilla/Mutex.h" -#include "nsIAsyncInputStream.h" -#include "nsICloneableInputStream.h" -#include "nsIIPCSerializableInputStream.h" - -namespace mozilla { -namespace dom { -namespace indexedDB { - -using namespace mozilla::ipc; - -namespace { - -class StreamWrapper final : public nsIAsyncInputStream, - public nsIInputStreamCallback, - public nsICloneableInputStream, - public nsIIPCSerializableInputStream { - class CloseRunnable; - - nsCOMPtr mOwningThread; - nsCOMPtr mInputStream; - RefPtr mFileHandle; - bool mFinished; - - // This is needed to call OnInputStreamReady() with the correct inputStream. - // It is protected by mutex. - nsCOMPtr mAsyncWaitCallback; - - Mutex mMutex; - - public: - StreamWrapper(nsIInputStream* aInputStream, IDBFileHandle* aFileHandle) - : mOwningThread(aFileHandle->GetMutableFile()->Database()->EventTarget()), - mInputStream(aInputStream), - mFileHandle(aFileHandle), - mFinished(false), - mMutex("StreamWrapper::mMutex") { - AssertIsOnOwningThread(); - MOZ_ASSERT(aInputStream); - MOZ_ASSERT(aFileHandle); - aFileHandle->AssertIsOnOwningThread(); - - mFileHandle->OnNewRequest(); - } - - private: - virtual ~StreamWrapper(); - - template - void SerializeInternal(InputStreamParams& aParams, - FileDescriptorArray& aFileDescriptors, - bool aDelayedStart, uint32_t aMaxSize, - uint32_t* aSizeUsed, M* aManager); - - bool IsOnOwningThread() const { - MOZ_ASSERT(mOwningThread); - - bool current; - return NS_SUCCEEDED(mOwningThread->IsOnCurrentThread(¤t)) && current; - } - - void AssertIsOnOwningThread() const { MOZ_ASSERT(IsOnOwningThread()); } - - void Finish() { - AssertIsOnOwningThread(); - - if (mFinished) { - return; - } - - mFinished = true; - - mFileHandle->OnRequestFinished(/* aActorDestroyedNormally */ true); - } - - void Destroy() { - if (IsOnOwningThread()) { - delete this; - return; - } - - RefPtr destroyRunnable = NewNonOwningRunnableMethod( - "StreamWrapper::Destroy", this, &StreamWrapper::Destroy); - - MOZ_ALWAYS_SUCCEEDS( - mOwningThread->Dispatch(destroyRunnable, NS_DISPATCH_NORMAL)); - } - - bool IsCloneableInputStream() const { - nsCOMPtr stream = do_QueryInterface(mInputStream); - return !!stream; - } - - bool IsIPCSerializableInputStream() const { - nsCOMPtr stream = - do_QueryInterface(mInputStream); - return !!stream; - } - - bool IsAsyncInputStream() const { - nsCOMPtr stream = do_QueryInterface(mInputStream); - return !!stream; - } - - NS_DECL_THREADSAFE_ISUPPORTS - NS_DECL_NSIINPUTSTREAM - NS_DECL_NSIASYNCINPUTSTREAM - NS_DECL_NSIINPUTSTREAMCALLBACK - NS_DECL_NSICLONEABLEINPUTSTREAM - NS_DECL_NSIIPCSERIALIZABLEINPUTSTREAM -}; - -class StreamWrapper::CloseRunnable final : public Runnable { - friend class StreamWrapper; - - RefPtr mStreamWrapper; - - public: - NS_INLINE_DECL_REFCOUNTING_INHERITED(CloseRunnable, Runnable) - - private: - explicit CloseRunnable(StreamWrapper* aStreamWrapper) - : Runnable("StreamWrapper::CloseRunnable"), - mStreamWrapper(aStreamWrapper) {} - - ~CloseRunnable() = default; - - NS_IMETHOD - Run() override; -}; - -} // anonymous namespace - -BlobImplSnapshot::BlobImplSnapshot(BlobImpl* aFileImpl, - IDBFileHandle* aFileHandle) - : mBlobImpl(aFileImpl) { - MOZ_ASSERT(aFileImpl); - MOZ_ASSERT(aFileHandle); - - mFileHandle = - do_GetWeakReference(NS_ISUPPORTS_CAST(EventTarget*, aFileHandle)); -} - -BlobImplSnapshot::BlobImplSnapshot(BlobImpl* aFileImpl, - nsIWeakReference* aFileHandle) - : mBlobImpl(aFileImpl), mFileHandle(aFileHandle) { - MOZ_ASSERT(aFileImpl); - MOZ_ASSERT(aFileHandle); -} - -NS_IMPL_ISUPPORTS_INHERITED(BlobImplSnapshot, BlobImpl, PIBlobImplSnapshot) - -already_AddRefed BlobImplSnapshot::CreateSlice( - uint64_t aStart, uint64_t aLength, const nsAString& aContentType, - ErrorResult& aRv) { - RefPtr blobImpl = - mBlobImpl->CreateSlice(aStart, aLength, aContentType, aRv); - - if (NS_WARN_IF(aRv.Failed())) { - return nullptr; - } - - blobImpl = new BlobImplSnapshot(blobImpl, mFileHandle); - return blobImpl.forget(); -} - -void BlobImplSnapshot::CreateInputStream(nsIInputStream** aStream, - ErrorResult& aRv) { - nsCOMPtr et = do_QueryReferent(mFileHandle); - RefPtr fileHandle = static_cast(et.get()); - if (!fileHandle || !fileHandle->IsOpen()) { - aRv.Throw(NS_ERROR_DOM_FILEHANDLE_INACTIVE_ERR); - return; - } - - nsCOMPtr stream; - mBlobImpl->CreateInputStream(getter_AddRefs(stream), aRv); - if (NS_WARN_IF(aRv.Failed())) { - return; - } - - RefPtr wrapper = new StreamWrapper(stream, fileHandle); - - wrapper.forget(aStream); -} - -BlobImpl* BlobImplSnapshot::GetBlobImpl() const { - nsCOMPtr et = do_QueryReferent(mFileHandle); - RefPtr fileHandle = static_cast(et.get()); - if (!fileHandle || !fileHandle->IsOpen()) { - return nullptr; - } - - return mBlobImpl; -} - -void BlobImplSnapshot::GetBlobImplType(nsAString& aBlobImplType) const { - aBlobImplType.AssignLiteral("BlobImplSnapshot["); - - nsAutoString blobImplType; - mBlobImpl->GetBlobImplType(blobImplType); - aBlobImplType.Append(blobImplType); - - aBlobImplType.AppendLiteral("]"); -} - -StreamWrapper::~StreamWrapper() { - AssertIsOnOwningThread(); - - Finish(); -} - -NS_IMPL_ADDREF(StreamWrapper) -NS_IMPL_RELEASE_WITH_DESTROY(StreamWrapper, Destroy()) - -NS_INTERFACE_MAP_BEGIN(StreamWrapper) - NS_INTERFACE_MAP_ENTRY(nsIInputStream) - NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAsyncInputStream, IsAsyncInputStream()) - NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIInputStreamCallback, - IsAsyncInputStream()) - NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsICloneableInputStream, - IsCloneableInputStream()) - NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIIPCSerializableInputStream, - IsIPCSerializableInputStream()) - NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIInputStream) -NS_INTERFACE_MAP_END - -NS_IMETHODIMP -StreamWrapper::Close() { - RefPtr closeRunnable = new CloseRunnable(this); - - MOZ_ALWAYS_SUCCEEDS( - mOwningThread->Dispatch(closeRunnable, NS_DISPATCH_NORMAL)); - - return NS_OK; -} - -NS_IMETHODIMP -StreamWrapper::Available(uint64_t* _retval) { - return mInputStream->Available(_retval); -} - -NS_IMETHODIMP -StreamWrapper::Read(char* aBuf, uint32_t aCount, uint32_t* _retval) { - return mInputStream->Read(aBuf, aCount, _retval); -} - -NS_IMETHODIMP -StreamWrapper::ReadSegments(nsWriteSegmentFun aWriter, void* aClosure, - uint32_t aCount, uint32_t* _retval) { - return mInputStream->ReadSegments(aWriter, aClosure, aCount, _retval); -} - -NS_IMETHODIMP -StreamWrapper::IsNonBlocking(bool* _retval) { - return mInputStream->IsNonBlocking(_retval); -} - -void StreamWrapper::Serialize(InputStreamParams& aParams, - FileDescriptorArray& aFileDescriptors, - bool aDelayedStart, uint32_t aMaxSize, - uint32_t* aSizeUsed, - ParentToChildStreamActorManager* aManager) { - SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize, - aSizeUsed, aManager); -} - -void StreamWrapper::Serialize(InputStreamParams& aParams, - FileDescriptorArray& aFileDescriptors, - bool aDelayedStart, uint32_t aMaxSize, - uint32_t* aSizeUsed, - ChildToParentStreamActorManager* aManager) { - SerializeInternal(aParams, aFileDescriptors, aDelayedStart, aMaxSize, - aSizeUsed, aManager); -} - -template -void StreamWrapper::SerializeInternal(InputStreamParams& aParams, - FileDescriptorArray& aFileDescriptors, - bool aDelayedStart, uint32_t aMaxSize, - uint32_t* aSizeUsed, M* aManager) { - MOZ_ASSERT(aSizeUsed); - *aSizeUsed = 0; - - nsCOMPtr stream = - do_QueryInterface(mInputStream); - - if (stream) { - stream->Serialize(aParams, aFileDescriptors, aDelayedStart, aMaxSize, - aSizeUsed, aManager); - } -} - -bool StreamWrapper::Deserialize(const InputStreamParams& aParams, - const FileDescriptorArray& aFileDescriptors) { - MOZ_CRASH("This method should never be called"); - return false; -} - -NS_IMETHODIMP -StreamWrapper::CloseWithStatus(nsresult aStatus) { - nsCOMPtr stream = do_QueryInterface(mInputStream); - if (!stream) { - return NS_ERROR_NO_INTERFACE; - } - - nsresult rv = stream->CloseWithStatus(aStatus); - if (NS_WARN_IF(NS_FAILED(rv))) { - return rv; - } - - return Close(); -} - -NS_IMETHODIMP -StreamWrapper::AsyncWait(nsIInputStreamCallback* aCallback, uint32_t aFlags, - uint32_t aRequestedCount, - nsIEventTarget* aEventTarget) { - nsCOMPtr stream = do_QueryInterface(mInputStream); - if (!stream) { - return NS_ERROR_NO_INTERFACE; - } - - nsCOMPtr callback = aCallback ? this : nullptr; - { - MutexAutoLock lock(mMutex); - - if (mAsyncWaitCallback && aCallback) { - return NS_ERROR_FAILURE; - } - - mAsyncWaitCallback = aCallback; - } - - return stream->AsyncWait(callback, aFlags, aRequestedCount, aEventTarget); -} - -// nsIInputStreamCallback - -NS_IMETHODIMP -StreamWrapper::OnInputStreamReady(nsIAsyncInputStream* aStream) { - nsCOMPtr stream = do_QueryInterface(mInputStream); - if (!stream) { - return NS_ERROR_NO_INTERFACE; - } - - nsCOMPtr callback; - { - MutexAutoLock lock(mMutex); - - // We have been canceled in the meanwhile. - if (!mAsyncWaitCallback) { - return NS_OK; - } - - callback = std::move(mAsyncWaitCallback); - } - - MOZ_ASSERT(callback); - return callback->OnInputStreamReady(this); -} - -// nsICloneableInputStream - -NS_IMETHODIMP -StreamWrapper::GetCloneable(bool* aCloneable) { - nsCOMPtr stream = do_QueryInterface(mInputStream); - if (!stream) { - *aCloneable = false; - return NS_ERROR_NO_INTERFACE; - } - - return stream->GetCloneable(aCloneable); -} - -NS_IMETHODIMP -StreamWrapper::Clone(nsIInputStream** aResult) { - nsCOMPtr stream = do_QueryInterface(mInputStream); - if (!stream) { - return NS_ERROR_NO_INTERFACE; - } - - return stream->Clone(aResult); -} - -NS_IMETHODIMP -StreamWrapper::CloseRunnable::Run() { - mStreamWrapper->Finish(); - - return NS_OK; -} - -} // namespace indexedDB -} // namespace dom -} // namespace mozilla diff --git a/dom/indexedDB/FileSnapshot.h b/dom/indexedDB/FileSnapshot.h deleted file mode 100644 index ed3a84142f56..000000000000 --- a/dom/indexedDB/FileSnapshot.h +++ /dev/null @@ -1,156 +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_indexeddb_filesnapshot_h__ -#define mozilla_dom_indexeddb_filesnapshot_h__ - -#include "mozilla/Attributes.h" -#include "mozilla/dom/File.h" -#include "nsISupports.h" -#include "nsIWeakReferenceUtils.h" - -#define FILEIMPLSNAPSHOT_IID \ - { \ - 0x0dfc11b1, 0x75d3, 0x473b, { \ - 0x8c, 0x67, 0xb7, 0x23, 0xf4, 0x67, 0xd6, 0x73 \ - } \ - } - -class PIBlobImplSnapshot : public nsISupports { - public: - NS_DECLARE_STATIC_IID_ACCESSOR(FILEIMPLSNAPSHOT_IID) - - virtual mozilla::dom::BlobImpl* GetBlobImpl() const = 0; -}; - -NS_DEFINE_STATIC_IID_ACCESSOR(PIBlobImplSnapshot, FILEIMPLSNAPSHOT_IID) - -namespace mozilla { -namespace dom { - -class IDBFileHandle; - -namespace indexedDB { - -class BlobImplSnapshot final : public BlobImpl, public PIBlobImplSnapshot { - RefPtr mBlobImpl; - nsWeakPtr mFileHandle; - - public: - BlobImplSnapshot(BlobImpl* aFileImpl, IDBFileHandle* aFileHandle); - - NS_DECL_ISUPPORTS_INHERITED - - private: - BlobImplSnapshot(BlobImpl* aFileImpl, nsIWeakReference* aFileHandle); - - ~BlobImplSnapshot() = default; - - // BlobImpl - virtual void GetName(nsAString& aName) const override { - mBlobImpl->GetName(aName); - } - - virtual void GetDOMPath(nsAString& aPath) const override { - mBlobImpl->GetDOMPath(aPath); - } - - virtual void SetDOMPath(const nsAString& aPath) override { - mBlobImpl->SetDOMPath(aPath); - } - - virtual int64_t GetLastModified(ErrorResult& aRv) override { - return mBlobImpl->GetLastModified(aRv); - } - - virtual void SetLastModified(int64_t aLastModified) override { - mBlobImpl->SetLastModified(aLastModified); - } - - virtual void GetMozFullPath(nsAString& aName, - SystemCallerGuarantee aGuarantee, - ErrorResult& aRv) override { - mBlobImpl->GetMozFullPath(aName, aGuarantee, aRv); - } - - virtual void GetMozFullPathInternal(nsAString& aFileName, - ErrorResult& aRv) override { - mBlobImpl->GetMozFullPathInternal(aFileName, aRv); - } - - virtual uint64_t GetSize(ErrorResult& aRv) override { - return mBlobImpl->GetSize(aRv); - } - - virtual void GetType(nsAString& aType) override { mBlobImpl->GetType(aType); } - - virtual void GetBlobImplType(nsAString& aBlobImplType) const override; - - size_t GetAllocationSize() const override { - return mBlobImpl->GetAllocationSize(); - } - - size_t GetAllocationSize( - FallibleTArray& aVisitedBlobs) const override { - return mBlobImpl->GetAllocationSize(aVisitedBlobs); - } - - virtual uint64_t GetSerialNumber() const override { - return mBlobImpl->GetSerialNumber(); - } - - virtual already_AddRefed CreateSlice(uint64_t aStart, - uint64_t aLength, - const nsAString& aContentType, - ErrorResult& aRv) override; - - virtual const nsTArray>* GetSubBlobImpls() const override { - return mBlobImpl->GetSubBlobImpls(); - } - - virtual void CreateInputStream(nsIInputStream** aStream, - ErrorResult& aRv) override; - - virtual int64_t GetFileId() override { return mBlobImpl->GetFileId(); } - - virtual nsresult GetSendInfo(nsIInputStream** aBody, uint64_t* aContentLength, - nsACString& aContentType, - nsACString& aCharset) override { - return mBlobImpl->GetSendInfo(aBody, aContentLength, aContentType, - aCharset); - } - - virtual void SetLazyData(const nsAString& aName, - const nsAString& aContentType, uint64_t aLength, - int64_t aLastModifiedDate) override { - MOZ_CRASH("This should never be called!"); - } - - virtual bool IsMemoryFile() const override { - return mBlobImpl->IsMemoryFile(); - } - - virtual bool IsSizeUnknown() const override { - return mBlobImpl->IsSizeUnknown(); - } - - virtual bool IsDateUnknown() const override { - return mBlobImpl->IsDateUnknown(); - } - - virtual bool IsFile() const override { return mBlobImpl->IsFile(); } - - virtual bool MayBeClonedToOtherThreads() const override { return false; } - - // PIBlobImplSnapshot - virtual BlobImpl* GetBlobImpl() const override; -}; - -} // namespace indexedDB -} // namespace dom -} // namespace mozilla - -#endif // mozilla_dom_indexeddb_filesnapshot_h__ diff --git a/dom/indexedDB/IDBMutableFile.cpp b/dom/indexedDB/IDBMutableFile.cpp index 8b78c1cbf6af..018a0ce597f7 100644 --- a/dom/indexedDB/IDBMutableFile.cpp +++ b/dom/indexedDB/IDBMutableFile.cpp @@ -181,22 +181,6 @@ RefPtr IDBMutableFile::Open(FileMode aMode, return fileHandle; } -RefPtr IDBMutableFile::GetFile(ErrorResult& aError) { - RefPtr fileHandle = Open(FileMode::Readonly, aError); - if (NS_WARN_IF(aError.Failed())) { - return nullptr; - } - - FileRequestGetFileParams params; - - auto request = - IDBFileRequest::Create(fileHandle, /* aWrapAsDOMRequest */ true); - - fileHandle->StartRequest(request, params); - - return request; -} - NS_IMPL_ADDREF_INHERITED(IDBMutableFile, DOMEventTargetHelper) NS_IMPL_RELEASE_INHERITED(IDBMutableFile, DOMEventTargetHelper) diff --git a/dom/indexedDB/IDBMutableFile.h b/dom/indexedDB/IDBMutableFile.h index 02c9bf3d4706..3ae0cc2d6b22 100644 --- a/dom/indexedDB/IDBMutableFile.h +++ b/dom/indexedDB/IDBMutableFile.h @@ -111,8 +111,6 @@ class IDBMutableFile final : public DOMEventTargetHelper { MOZ_MUST_USE RefPtr Open(FileMode aMode, ErrorResult& aError); - MOZ_MUST_USE RefPtr GetFile(ErrorResult& aError); - IMPL_EVENT_HANDLER(abort) IMPL_EVENT_HANDLER(error) diff --git a/dom/indexedDB/moz.build b/dom/indexedDB/moz.build index 7ada29e91f2b..fb02781d966f 100644 --- a/dom/indexedDB/moz.build +++ b/dom/indexedDB/moz.build @@ -45,7 +45,6 @@ EXPORTS.mozilla.dom += [ EXPORTS.mozilla.dom.indexedDB += [ 'ActorsParent.h', - 'FileSnapshot.h', 'IDBResult.h', 'Key.h', 'KeyPath.h', @@ -56,7 +55,6 @@ EXPORTS.mozilla.dom.indexedDB += [ UNIFIED_SOURCES += [ 'ActorsChild.cpp', 'FileInfo.cpp', - 'FileSnapshot.cpp', 'IDBCursor.cpp', 'IDBCursorType.cpp', 'IDBDatabase.cpp', diff --git a/dom/webidl/IDBMutableFile.webidl b/dom/webidl/IDBMutableFile.webidl index ab7cb2fa7fe5..e7d037066ad0 100644 --- a/dom/webidl/IDBMutableFile.webidl +++ b/dom/webidl/IDBMutableFile.webidl @@ -13,9 +13,6 @@ interface IDBMutableFile : EventTarget { [Throws, UseCounter] IDBFileHandle open(optional FileMode mode = "readonly"); - [Throws, UseCounter] - DOMRequest getFile(); - attribute EventHandler onabort; attribute EventHandler onerror; }; diff --git a/ipc/glue/BackgroundChildImpl.cpp b/ipc/glue/BackgroundChildImpl.cpp index 6cb440f328a9..68470941ba2c 100644 --- a/ipc/glue/BackgroundChildImpl.cpp +++ b/ipc/glue/BackgroundChildImpl.cpp @@ -27,7 +27,6 @@ #include "mozilla/dom/FileSystemTaskBase.h" #include "mozilla/dom/IPCBlobInputStreamChild.h" #include "mozilla/dom/PMediaTransportChild.h" -#include "mozilla/dom/PendingIPCBlobChild.h" #include "mozilla/dom/TemporaryIPCBlobChild.h" #include "mozilla/dom/cache/ActorUtils.h" #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h" @@ -312,17 +311,6 @@ bool BackgroundChildImpl::DeallocPBackgroundStorageChild( return true; } -dom::PPendingIPCBlobChild* BackgroundChildImpl::AllocPPendingIPCBlobChild( - const IPCBlob& aBlob) { - return new dom::PendingIPCBlobChild(aBlob); -} - -bool BackgroundChildImpl::DeallocPPendingIPCBlobChild( - dom::PPendingIPCBlobChild* aActor) { - delete aActor; - return true; -} - dom::PRemoteWorkerChild* BackgroundChildImpl::AllocPRemoteWorkerChild( const RemoteWorkerData& aData) { RefPtr agent = new dom::RemoteWorkerChild(aData); diff --git a/ipc/glue/BackgroundChildImpl.h b/ipc/glue/BackgroundChildImpl.h index 280826cf4b60..bcdc78de55c9 100644 --- a/ipc/glue/BackgroundChildImpl.h +++ b/ipc/glue/BackgroundChildImpl.h @@ -117,12 +117,6 @@ class BackgroundChildImpl : public PBackgroundChild, virtual bool DeallocPBackgroundStorageChild( PBackgroundStorageChild* aActor) override; - virtual PPendingIPCBlobChild* AllocPPendingIPCBlobChild( - const IPCBlob& aBlob) override; - - virtual bool DeallocPPendingIPCBlobChild( - PPendingIPCBlobChild* aActor) override; - virtual already_AddRefed AllocPIPCBlobInputStreamChild(const nsID& aID, const uint64_t& aSize) override; diff --git a/ipc/glue/BackgroundParentImpl.cpp b/ipc/glue/BackgroundParentImpl.cpp index 813817d72d0a..a3a5cdff40f1 100644 --- a/ipc/glue/BackgroundParentImpl.cpp +++ b/ipc/glue/BackgroundParentImpl.cpp @@ -26,7 +26,6 @@ #include "mozilla/dom/PGamepadTestChannelParent.h" #include "mozilla/dom/MediaTransportParent.h" #include "mozilla/dom/MessagePortParent.h" -#include "mozilla/dom/PendingIPCBlobParent.h" #include "mozilla/dom/ServiceWorkerActors.h" #include "mozilla/dom/ServiceWorkerManagerParent.h" #include "mozilla/dom/ServiceWorkerRegistrar.h" @@ -477,21 +476,6 @@ BackgroundParentImpl::AllocPIdleSchedulerParent() { return actor.forget(); } -mozilla::dom::PPendingIPCBlobParent* -BackgroundParentImpl::AllocPPendingIPCBlobParent(const IPCBlob& aBlob) { - MOZ_CRASH("PPendingIPCBlobParent actors should be manually constructed!"); -} - -bool BackgroundParentImpl::DeallocPPendingIPCBlobParent( - mozilla::dom::PPendingIPCBlobParent* aActor) { - AssertIsInMainOrSocketProcess(); - AssertIsOnBackgroundThread(); - MOZ_ASSERT(aActor); - - delete aActor; - return true; -} - mozilla::dom::PRemoteWorkerParent* BackgroundParentImpl::AllocPRemoteWorkerParent(const RemoteWorkerData& aData) { RefPtr agent = new dom::RemoteWorkerParent(); diff --git a/ipc/glue/BackgroundParentImpl.h b/ipc/glue/BackgroundParentImpl.h index 94964b43c29a..32de86419f59 100644 --- a/ipc/glue/BackgroundParentImpl.h +++ b/ipc/glue/BackgroundParentImpl.h @@ -142,12 +142,6 @@ class BackgroundParentImpl : public PBackgroundParent, virtual already_AddRefed AllocPIdleSchedulerParent() override; - virtual PPendingIPCBlobParent* AllocPPendingIPCBlobParent( - const IPCBlob& aBlob) override; - - virtual bool DeallocPPendingIPCBlobParent( - PPendingIPCBlobParent* aActor) override; - virtual already_AddRefed AllocPIPCBlobInputStreamParent(const nsID& aID, const uint64_t& aSize) override; diff --git a/ipc/glue/PBackground.ipdl b/ipc/glue/PBackground.ipdl index 8ca25c0f161d..6a8aa16f8980 100644 --- a/ipc/glue/PBackground.ipdl +++ b/ipc/glue/PBackground.ipdl @@ -26,7 +26,6 @@ include protocol PHttpBackgroundChannel; include protocol PIdleScheduler; include protocol PIPCBlobInputStream; include protocol PMediaTransport; -include protocol PPendingIPCBlob; include protocol PRemoteWorker; include protocol PRemoteWorkerController; include protocol PRemoteWorkerService; @@ -95,7 +94,6 @@ sync protocol PBackground manages PIdleScheduler; manages PIPCBlobInputStream; manages PMediaTransport; - manages PPendingIPCBlob; manages PRemoteWorker; manages PRemoteWorkerController; manages PRemoteWorkerService; @@ -243,8 +241,6 @@ child: async PParentToChildStream(); - async PPendingIPCBlob(IPCBlob blob); - async PRemoteWorker(RemoteWorkerData data); both: