зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - IPCBlobInputStream actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28191 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6bbc401f45
Коммит
3512672cd3
|
@ -4,8 +4,8 @@
|
|||
* 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_IPCBlobInputStream_h
|
||||
#define mozilla_dom_ipc_IPCBlobInputStream_h
|
||||
#ifndef mozilla_dom_IPCBlobInputStream_h
|
||||
#define mozilla_dom_IPCBlobInputStream_h
|
||||
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "nsIAsyncInputStream.h"
|
||||
|
@ -139,4 +139,4 @@ class IPCBlobInputStream final : public nsIAsyncInputStream,
|
|||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_ipc_IPCBlobInputStream_h
|
||||
#endif // mozilla_dom_IPCBlobInputStream_h
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
* 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_IPCBlobInputStreamChild_h
|
||||
#define mozilla_dom_ipc_IPCBlobInputStreamChild_h
|
||||
#ifndef mozilla_dom_IPCBlobInputStreamChild_h
|
||||
#define mozilla_dom_IPCBlobInputStreamChild_h
|
||||
|
||||
#include "mozilla/ipc/PIPCBlobInputStreamChild.h"
|
||||
#include "mozilla/dom/PIPCBlobInputStreamChild.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "nsIThread.h"
|
||||
|
@ -19,8 +19,7 @@ namespace dom {
|
|||
class IPCBlobInputStream;
|
||||
class ThreadSafeWorkerRef;
|
||||
|
||||
class IPCBlobInputStreamChild final
|
||||
: public mozilla::ipc::PIPCBlobInputStreamChild {
|
||||
class IPCBlobInputStreamChild final : public PIPCBlobInputStreamChild {
|
||||
public:
|
||||
enum ActorState {
|
||||
// The actor is connected via IPDL to the parent.
|
||||
|
@ -101,4 +100,4 @@ class IPCBlobInputStreamChild final
|
|||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_ipc_IPCBlobInputStreamChild_h
|
||||
#endif // mozilla_dom_IPCBlobInputStreamChild_h
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
* 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_IPCBlobInputStreamParent_h
|
||||
#define mozilla_dom_ipc_IPCBlobInputStreamParent_h
|
||||
#ifndef mozilla_dom_IPCBlobInputStreamParent_h
|
||||
#define mozilla_dom_IPCBlobInputStreamParent_h
|
||||
|
||||
#include "mozilla/ipc/PIPCBlobInputStreamParent.h"
|
||||
#include "mozilla/dom/PIPCBlobInputStreamParent.h"
|
||||
|
||||
class nsIInputStream;
|
||||
|
||||
|
@ -24,8 +24,7 @@ class NS_NO_VTABLE IPCBlobInputStreamParentCallback {
|
|||
virtual ~IPCBlobInputStreamParentCallback() {}
|
||||
};
|
||||
|
||||
class IPCBlobInputStreamParent final
|
||||
: public mozilla::ipc::PIPCBlobInputStreamParent {
|
||||
class IPCBlobInputStreamParent final : public PIPCBlobInputStreamParent {
|
||||
public:
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(IPCBlobInputStreamParent)
|
||||
|
||||
|
@ -84,4 +83,4 @@ class IPCBlobInputStreamParent final
|
|||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_ipc_IPCBlobInputStreamParent_h
|
||||
#endif // mozilla_dom_IPCBlobInputStreamParent_h
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* 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_IPCBlobInputStreamStorage_h
|
||||
#define mozilla_dom_ipc_IPCBlobInputStreamStorage_h
|
||||
#ifndef mozilla_dom_IPCBlobInputStreamStorage_h
|
||||
#define mozilla_dom_IPCBlobInputStreamStorage_h
|
||||
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsClassHashtable.h"
|
||||
|
@ -64,4 +64,4 @@ class IPCBlobInputStreamStorage final : public nsIObserver {
|
|||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_ipc_IPCBlobInputStreamStorage_h
|
||||
#endif // mozilla_dom_IPCBlobInputStreamStorage_h
|
||||
|
|
|
@ -11,7 +11,7 @@ include protocol PParentToChildStream;
|
|||
include IPCStream;
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
namespace dom {
|
||||
|
||||
protocol PIPCBlobInputStream
|
||||
{
|
||||
|
|
|
@ -10,17 +10,14 @@ with Files("**"):
|
|||
EXPORTS.mozilla.dom += [
|
||||
'FileCreatorChild.h',
|
||||
'FileCreatorParent.h',
|
||||
'PendingIPCBlobChild.h',
|
||||
'PendingIPCBlobParent.h',
|
||||
'TemporaryIPCBlobChild.h',
|
||||
'TemporaryIPCBlobParent.h',
|
||||
]
|
||||
|
||||
EXPORTS.mozilla.dom.ipc += [
|
||||
'IPCBlobInputStream.h',
|
||||
'IPCBlobInputStreamChild.h',
|
||||
'IPCBlobInputStreamParent.h',
|
||||
'IPCBlobInputStreamStorage.h',
|
||||
'PendingIPCBlobChild.h',
|
||||
'PendingIPCBlobParent.h',
|
||||
'TemporaryIPCBlobChild.h',
|
||||
'TemporaryIPCBlobParent.h',
|
||||
]
|
||||
|
||||
EXPORTS.mozilla.dom += [
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
#include "mozilla/dom/indexedDB/PBackgroundIDBTransactionParent.h"
|
||||
#include "mozilla/dom/indexedDB/PBackgroundIDBVersionChangeTransactionParent.h"
|
||||
#include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsParent.h"
|
||||
#include "mozilla/dom/IPCBlobInputStreamParent.h"
|
||||
#include "mozilla/dom/IPCBlobUtils.h"
|
||||
#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
|
||||
#include "mozilla/dom/quota/CheckedUnsafePtr.h"
|
||||
#include "mozilla/dom/quota/Client.h"
|
||||
#include "mozilla/dom/quota/FileStreams.h"
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "mozilla/dom/DocGroup.h"
|
||||
#include "mozilla/dom/ExternalHelperAppChild.h"
|
||||
#include "mozilla/dom/GetFilesHelper.h"
|
||||
#include "mozilla/dom/IPCBlobInputStreamChild.h"
|
||||
#include "mozilla/dom/IPCBlobUtils.h"
|
||||
#include "mozilla/dom/JSWindowActorService.h"
|
||||
#include "mozilla/dom/LSObject.h"
|
||||
|
@ -54,7 +55,6 @@
|
|||
#include "mozilla/dom/URLClassifierChild.h"
|
||||
#include "mozilla/dom/WorkerDebugger.h"
|
||||
#include "mozilla/dom/WorkerDebuggerManager.h"
|
||||
#include "mozilla/dom/ipc/IPCBlobInputStreamChild.h"
|
||||
#include "mozilla/dom/ipc/SharedMap.h"
|
||||
#include "mozilla/gfx/gfxVars.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/File.h"
|
||||
#include "mozilla/dom/FileSystemSecurity.h"
|
||||
#include "mozilla/dom/IPCBlobInputStreamParent.h"
|
||||
#include "mozilla/dom/IPCBlobUtils.h"
|
||||
#include "mozilla/dom/ExternalHelperAppParent.h"
|
||||
#include "mozilla/dom/GetFilesHelper.h"
|
||||
|
@ -68,7 +69,6 @@
|
|||
#include "mozilla/dom/quota/QuotaManagerService.h"
|
||||
#include "mozilla/dom/ServiceWorkerUtils.h"
|
||||
#include "mozilla/dom/URLClassifierParent.h"
|
||||
#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
|
||||
#include "mozilla/dom/ipc/SharedMap.h"
|
||||
#include "mozilla/embedding/printingui/PrintingParent.h"
|
||||
#include "mozilla/extensions/StreamFilterParent.h"
|
||||
|
|
|
@ -25,12 +25,12 @@
|
|||
#include "mozilla/dom/PFileSystemRequestChild.h"
|
||||
#include "mozilla/dom/EndpointForReportChild.h"
|
||||
#include "mozilla/dom/FileSystemTaskBase.h"
|
||||
#include "mozilla/dom/IPCBlobInputStreamChild.h"
|
||||
#include "mozilla/dom/PendingIPCBlobChild.h"
|
||||
#include "mozilla/dom/TemporaryIPCBlobChild.h"
|
||||
#include "mozilla/dom/cache/ActorUtils.h"
|
||||
#include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h"
|
||||
#include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsChild.h"
|
||||
#include "mozilla/dom/ipc/IPCBlobInputStreamChild.h"
|
||||
#include "mozilla/dom/IPCBlobUtils.h"
|
||||
#include "mozilla/dom/quota/PQuotaChild.h"
|
||||
#include "mozilla/dom/RemoteWorkerChild.h"
|
||||
|
@ -394,20 +394,21 @@ bool BackgroundChildImpl::DeallocPFileCreatorChild(PFileCreatorChild* aActor) {
|
|||
return true;
|
||||
}
|
||||
|
||||
PIPCBlobInputStreamChild* BackgroundChildImpl::AllocPIPCBlobInputStreamChild(
|
||||
const nsID& aID, const uint64_t& aSize) {
|
||||
dom::PIPCBlobInputStreamChild*
|
||||
BackgroundChildImpl::AllocPIPCBlobInputStreamChild(const nsID& aID,
|
||||
const uint64_t& aSize) {
|
||||
// IPCBlobInputStreamChild is refcounted. Here it's created and in
|
||||
// DeallocPIPCBlobInputStreamChild is released.
|
||||
|
||||
RefPtr<mozilla::dom::IPCBlobInputStreamChild> actor =
|
||||
new mozilla::dom::IPCBlobInputStreamChild(aID, aSize);
|
||||
RefPtr<dom::IPCBlobInputStreamChild> actor =
|
||||
new dom::IPCBlobInputStreamChild(aID, aSize);
|
||||
return actor.forget().take();
|
||||
}
|
||||
|
||||
bool BackgroundChildImpl::DeallocPIPCBlobInputStreamChild(
|
||||
PIPCBlobInputStreamChild* aActor) {
|
||||
RefPtr<mozilla::dom::IPCBlobInputStreamChild> actor =
|
||||
dont_AddRef(static_cast<mozilla::dom::IPCBlobInputStreamChild*>(aActor));
|
||||
dom::PIPCBlobInputStreamChild* aActor) {
|
||||
RefPtr<dom::IPCBlobInputStreamChild> actor =
|
||||
dont_AddRef(static_cast<dom::IPCBlobInputStreamChild*>(aActor));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "mozilla/dom/TemporaryIPCBlobParent.h"
|
||||
#include "mozilla/dom/cache/ActorUtils.h"
|
||||
#include "mozilla/dom/indexedDB/ActorsParent.h"
|
||||
#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
|
||||
#include "mozilla/dom/IPCBlobInputStreamParent.h"
|
||||
#include "mozilla/dom/IPCBlobUtils.h"
|
||||
#include "mozilla/dom/localstorage/ActorsParent.h"
|
||||
#include "mozilla/dom/quota/ActorsParent.h"
|
||||
|
@ -604,21 +604,22 @@ bool BackgroundParentImpl::DeallocPTemporaryIPCBlobParent(
|
|||
return true;
|
||||
}
|
||||
|
||||
PIPCBlobInputStreamParent* BackgroundParentImpl::AllocPIPCBlobInputStreamParent(
|
||||
const nsID& aID, const uint64_t& aSize) {
|
||||
dom::PIPCBlobInputStreamParent*
|
||||
BackgroundParentImpl::AllocPIPCBlobInputStreamParent(const nsID& aID,
|
||||
const uint64_t& aSize) {
|
||||
AssertIsInMainOrSocketProcess();
|
||||
AssertIsOnBackgroundThread();
|
||||
|
||||
RefPtr<mozilla::dom::IPCBlobInputStreamParent> actor =
|
||||
mozilla::dom::IPCBlobInputStreamParent::Create(aID, aSize, this);
|
||||
RefPtr<dom::IPCBlobInputStreamParent> actor =
|
||||
dom::IPCBlobInputStreamParent::Create(aID, aSize, this);
|
||||
return actor.forget().take();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
BackgroundParentImpl::RecvPIPCBlobInputStreamConstructor(
|
||||
PIPCBlobInputStreamParent* aActor, const nsID& aID, const uint64_t& aSize) {
|
||||
if (!static_cast<mozilla::dom::IPCBlobInputStreamParent*>(aActor)
|
||||
->HasValidStream()) {
|
||||
dom::PIPCBlobInputStreamParent* aActor, const nsID& aID,
|
||||
const uint64_t& aSize) {
|
||||
if (!static_cast<dom::IPCBlobInputStreamParent*>(aActor)->HasValidStream()) {
|
||||
return IPC_FAIL_NO_REASON(this);
|
||||
}
|
||||
|
||||
|
@ -626,13 +627,13 @@ BackgroundParentImpl::RecvPIPCBlobInputStreamConstructor(
|
|||
}
|
||||
|
||||
bool BackgroundParentImpl::DeallocPIPCBlobInputStreamParent(
|
||||
PIPCBlobInputStreamParent* aActor) {
|
||||
dom::PIPCBlobInputStreamParent* aActor) {
|
||||
AssertIsInMainOrSocketProcess();
|
||||
AssertIsOnBackgroundThread();
|
||||
MOZ_ASSERT(aActor);
|
||||
|
||||
RefPtr<mozilla::dom::IPCBlobInputStreamParent> actor =
|
||||
dont_AddRef(static_cast<mozilla::dom::IPCBlobInputStreamParent*>(aActor));
|
||||
RefPtr<dom::IPCBlobInputStreamParent> actor =
|
||||
dont_AddRef(static_cast<dom::IPCBlobInputStreamParent*>(aActor));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/dom/File.h"
|
||||
#include "mozilla/dom/ipc/IPCBlobInputStream.h"
|
||||
#include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
|
||||
#include "mozilla/dom/IPCBlobInputStream.h"
|
||||
#include "mozilla/dom/IPCBlobInputStreamStorage.h"
|
||||
#include "mozilla/ipc/IPCStreamDestination.h"
|
||||
#include "mozilla/ipc/IPCStreamSource.h"
|
||||
#include "mozilla/InputStreamLengthHelper.h"
|
||||
|
|
|
@ -42,13 +42,6 @@ DIRECT_CALL_OVERRIDES = {
|
|||
("PGMPVideoEncoder", "child"): ("GMPVideoEncoderChild", "GMPVideoEncoderChild.h"),
|
||||
("PGMPVideoDecoder", "child"): ("GMPVideoDecoderChild", "GMPVideoDecoderChild.h"),
|
||||
|
||||
("PIPCBlobInputStream", "child"): (
|
||||
"mozilla::dom::IPCBlobInputStreamChild", "mozilla/dom/ipc/IPCBlobInputStreamChild.h"
|
||||
),
|
||||
("PIPCBlobInputStream", "parent"): (
|
||||
"mozilla::dom::IPCBlobInputStreamParent", "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
|
||||
),
|
||||
|
||||
("PLoginReputation", "parent"): ("LoginReputationParent", "mozilla/LoginReputationIPC.h"),
|
||||
|
||||
("PMedia", "child"): ("Child", "mozilla/media/MediaChild.h"),
|
||||
|
|
|
@ -113,8 +113,8 @@
|
|||
#include "mozilla/HTMLEditorController.h"
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "mozilla/StaticPresData.h"
|
||||
#include "mozilla/dom/IPCBlobInputStreamStorage.h"
|
||||
#include "mozilla/dom/WebIDLGlobalNameHash.h"
|
||||
#include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
|
||||
#include "mozilla/dom/U2FTokenManager.h"
|
||||
#ifdef OS_WIN
|
||||
# include "mozilla/dom/WinWebAuthnManager.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче