зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - TemporaryIPCBlob actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28190 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
69fd7c57d7
Коммит
7d30a9996e
|
@ -8,7 +8,7 @@
|
||||||
#include "MutableBlobStorage.h"
|
#include "MutableBlobStorage.h"
|
||||||
#include "MemoryBlobImpl.h"
|
#include "MemoryBlobImpl.h"
|
||||||
#include "mozilla/CheckedInt.h"
|
#include "mozilla/CheckedInt.h"
|
||||||
#include "mozilla/dom/ipc/TemporaryIPCBlobChild.h"
|
#include "mozilla/dom/TemporaryIPCBlobChild.h"
|
||||||
#include "mozilla/dom/WorkerPrivate.h"
|
#include "mozilla/dom/WorkerPrivate.h"
|
||||||
#include "mozilla/ipc/BackgroundChild.h"
|
#include "mozilla/ipc/BackgroundChild.h"
|
||||||
#include "mozilla/ipc/PBackgroundChild.h"
|
#include "mozilla/ipc/PBackgroundChild.h"
|
||||||
|
|
|
@ -11,7 +11,7 @@ include protocol PParentToChildStream;
|
||||||
include IPCBlob;
|
include IPCBlob;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace ipc {
|
namespace dom {
|
||||||
|
|
||||||
union IPCBlobOrError
|
union IPCBlobOrError
|
||||||
{
|
{
|
||||||
|
@ -39,5 +39,5 @@ parent:
|
||||||
async OperationDone(nsCString aContentType, FileDescriptor aFD);
|
async OperationDone(nsCString aContentType, FileDescriptor aFD);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ipc
|
} // namespace dom
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#ifndef mozilla_dom_ipc_TemporaryIPCBlobChild_h
|
#ifndef mozilla_dom_TemporaryIPCBlobChild_h
|
||||||
#define mozilla_dom_ipc_TemporaryIPCBlobChild_h
|
#define mozilla_dom_TemporaryIPCBlobChild_h
|
||||||
|
|
||||||
#include "mozilla/ipc/PTemporaryIPCBlob.h"
|
#include "mozilla/dom/PTemporaryIPCBlob.h"
|
||||||
#include "mozilla/ipc/PTemporaryIPCBlobChild.h"
|
#include "mozilla/dom/PTemporaryIPCBlobChild.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
@ -23,9 +23,8 @@ class TemporaryIPCBlobChildCallback {
|
||||||
virtual void OperationFailed(nsresult aRv) = 0;
|
virtual void OperationFailed(nsresult aRv) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TemporaryIPCBlobChild final
|
class TemporaryIPCBlobChild final : public PTemporaryIPCBlobChild {
|
||||||
: public mozilla::ipc::PTemporaryIPCBlobChild {
|
friend class PTemporaryIPCBlobChild;
|
||||||
friend class mozilla::ipc::PTemporaryIPCBlobChild;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NS_INLINE_DECL_REFCOUNTING(TemporaryIPCBlobChild)
|
NS_INLINE_DECL_REFCOUNTING(TemporaryIPCBlobChild)
|
||||||
|
@ -53,4 +52,4 @@ class TemporaryIPCBlobChild final
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // mozilla_dom_ipc_TemporaryIPCBlobChild_h
|
#endif // mozilla_dom_TemporaryIPCBlobChild_h
|
||||||
|
|
|
@ -4,20 +4,19 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#ifndef mozilla_dom_ipc_TemporaryIPCBlobParent_h
|
#ifndef mozilla_dom_TemporaryIPCBlobParent_h
|
||||||
#define mozilla_dom_ipc_TemporaryIPCBlobParent_h
|
#define mozilla_dom_TemporaryIPCBlobParent_h
|
||||||
|
|
||||||
#include "mozilla/ipc/PTemporaryIPCBlob.h"
|
#include "mozilla/dom/PTemporaryIPCBlob.h"
|
||||||
#include "mozilla/ipc/PTemporaryIPCBlobParent.h"
|
#include "mozilla/dom/PTemporaryIPCBlobParent.h"
|
||||||
|
|
||||||
class nsIFile;
|
class nsIFile;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class TemporaryIPCBlobParent final
|
class TemporaryIPCBlobParent final : public PTemporaryIPCBlobParent {
|
||||||
: public mozilla::ipc::PTemporaryIPCBlobParent {
|
friend class PTemporaryIPCBlobParent;
|
||||||
friend class mozilla::ipc::PTemporaryIPCBlobParent;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TemporaryIPCBlobParent();
|
explicit TemporaryIPCBlobParent();
|
||||||
|
@ -43,4 +42,4 @@ class TemporaryIPCBlobParent final
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // mozilla_dom_ipc_TemporaryIPCBlobParent_h
|
#endif // mozilla_dom_TemporaryIPCBlobParent_h
|
||||||
|
|
|
@ -19,6 +19,8 @@ EXPORTS.mozilla.dom += [
|
||||||
'IPCBlobUtils.h',
|
'IPCBlobUtils.h',
|
||||||
'PendingIPCBlobChild.h',
|
'PendingIPCBlobChild.h',
|
||||||
'PendingIPCBlobParent.h',
|
'PendingIPCBlobParent.h',
|
||||||
|
'TemporaryIPCBlobChild.h',
|
||||||
|
'TemporaryIPCBlobParent.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
EXPORTS.mozilla.dom.ipc += [
|
EXPORTS.mozilla.dom.ipc += [
|
||||||
|
@ -26,8 +28,6 @@ EXPORTS.mozilla.dom.ipc += [
|
||||||
'IPCBlobInputStreamChild.h',
|
'IPCBlobInputStreamChild.h',
|
||||||
'IPCBlobInputStreamParent.h',
|
'IPCBlobInputStreamParent.h',
|
||||||
'IPCBlobInputStreamStorage.h',
|
'IPCBlobInputStreamStorage.h',
|
||||||
'TemporaryIPCBlobChild.h',
|
|
||||||
'TemporaryIPCBlobParent.h',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
|
|
|
@ -26,11 +26,11 @@
|
||||||
#include "mozilla/dom/EndpointForReportChild.h"
|
#include "mozilla/dom/EndpointForReportChild.h"
|
||||||
#include "mozilla/dom/FileSystemTaskBase.h"
|
#include "mozilla/dom/FileSystemTaskBase.h"
|
||||||
#include "mozilla/dom/PendingIPCBlobChild.h"
|
#include "mozilla/dom/PendingIPCBlobChild.h"
|
||||||
|
#include "mozilla/dom/TemporaryIPCBlobChild.h"
|
||||||
#include "mozilla/dom/cache/ActorUtils.h"
|
#include "mozilla/dom/cache/ActorUtils.h"
|
||||||
#include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h"
|
#include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h"
|
||||||
#include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsChild.h"
|
#include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsChild.h"
|
||||||
#include "mozilla/dom/ipc/IPCBlobInputStreamChild.h"
|
#include "mozilla/dom/ipc/IPCBlobInputStreamChild.h"
|
||||||
#include "mozilla/dom/ipc/TemporaryIPCBlobChild.h"
|
|
||||||
#include "mozilla/dom/IPCBlobUtils.h"
|
#include "mozilla/dom/IPCBlobUtils.h"
|
||||||
#include "mozilla/dom/quota/PQuotaChild.h"
|
#include "mozilla/dom/quota/PQuotaChild.h"
|
||||||
#include "mozilla/dom/RemoteWorkerChild.h"
|
#include "mozilla/dom/RemoteWorkerChild.h"
|
||||||
|
@ -369,15 +369,16 @@ bool BackgroundChildImpl::DeallocPSharedWorkerChild(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PTemporaryIPCBlobChild* BackgroundChildImpl::AllocPTemporaryIPCBlobChild() {
|
dom::PTemporaryIPCBlobChild*
|
||||||
|
BackgroundChildImpl::AllocPTemporaryIPCBlobChild() {
|
||||||
MOZ_CRASH("This is not supposed to be called.");
|
MOZ_CRASH("This is not supposed to be called.");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BackgroundChildImpl::DeallocPTemporaryIPCBlobChild(
|
bool BackgroundChildImpl::DeallocPTemporaryIPCBlobChild(
|
||||||
PTemporaryIPCBlobChild* aActor) {
|
dom::PTemporaryIPCBlobChild* aActor) {
|
||||||
RefPtr<mozilla::dom::TemporaryIPCBlobChild> actor =
|
RefPtr<dom::TemporaryIPCBlobChild> actor =
|
||||||
dont_AddRef(static_cast<mozilla::dom::TemporaryIPCBlobChild*>(aActor));
|
dont_AddRef(static_cast<dom::TemporaryIPCBlobChild*>(aActor));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,10 @@
|
||||||
#include "mozilla/dom/ServiceWorkerManagerParent.h"
|
#include "mozilla/dom/ServiceWorkerManagerParent.h"
|
||||||
#include "mozilla/dom/ServiceWorkerRegistrar.h"
|
#include "mozilla/dom/ServiceWorkerRegistrar.h"
|
||||||
#include "mozilla/dom/StorageActivityService.h"
|
#include "mozilla/dom/StorageActivityService.h"
|
||||||
|
#include "mozilla/dom/TemporaryIPCBlobParent.h"
|
||||||
#include "mozilla/dom/cache/ActorUtils.h"
|
#include "mozilla/dom/cache/ActorUtils.h"
|
||||||
#include "mozilla/dom/indexedDB/ActorsParent.h"
|
#include "mozilla/dom/indexedDB/ActorsParent.h"
|
||||||
#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
|
#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
|
||||||
#include "mozilla/dom/ipc/TemporaryIPCBlobParent.h"
|
|
||||||
#include "mozilla/dom/IPCBlobUtils.h"
|
#include "mozilla/dom/IPCBlobUtils.h"
|
||||||
#include "mozilla/dom/localstorage/ActorsParent.h"
|
#include "mozilla/dom/localstorage/ActorsParent.h"
|
||||||
#include "mozilla/dom/quota/ActorsParent.h"
|
#include "mozilla/dom/quota/ActorsParent.h"
|
||||||
|
@ -586,19 +586,20 @@ bool BackgroundParentImpl::DeallocPFileCreatorParent(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PTemporaryIPCBlobParent* BackgroundParentImpl::AllocPTemporaryIPCBlobParent() {
|
dom::PTemporaryIPCBlobParent*
|
||||||
return new mozilla::dom::TemporaryIPCBlobParent();
|
BackgroundParentImpl::AllocPTemporaryIPCBlobParent() {
|
||||||
|
return new dom::TemporaryIPCBlobParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
mozilla::ipc::IPCResult BackgroundParentImpl::RecvPTemporaryIPCBlobConstructor(
|
mozilla::ipc::IPCResult BackgroundParentImpl::RecvPTemporaryIPCBlobConstructor(
|
||||||
PTemporaryIPCBlobParent* aActor) {
|
dom::PTemporaryIPCBlobParent* aActor) {
|
||||||
mozilla::dom::TemporaryIPCBlobParent* actor =
|
dom::TemporaryIPCBlobParent* actor =
|
||||||
static_cast<mozilla::dom::TemporaryIPCBlobParent*>(aActor);
|
static_cast<dom::TemporaryIPCBlobParent*>(aActor);
|
||||||
return actor->CreateAndShareFile();
|
return actor->CreateAndShareFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BackgroundParentImpl::DeallocPTemporaryIPCBlobParent(
|
bool BackgroundParentImpl::DeallocPTemporaryIPCBlobParent(
|
||||||
PTemporaryIPCBlobParent* aActor) {
|
dom::PTemporaryIPCBlobParent* aActor) {
|
||||||
delete aActor;
|
delete aActor;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,13 +93,6 @@ DIRECT_CALL_OVERRIDES = {
|
||||||
"mozilla::dom::TCPSocketParent", "mozilla/dom/network/TCPSocketParent.h"
|
"mozilla::dom::TCPSocketParent", "mozilla/dom/network/TCPSocketParent.h"
|
||||||
),
|
),
|
||||||
|
|
||||||
("PTemporaryIPCBlob", "child"): (
|
|
||||||
"mozilla::dom::TemporaryIPCBlobChild", "mozilla/dom/ipc/TemporaryIPCBlobChild.h"
|
|
||||||
),
|
|
||||||
("PTemporaryIPCBlob", "parent"): (
|
|
||||||
"mozilla::dom::TemporaryIPCBlobParent", "mozilla/dom/ipc/TemporaryIPCBlobParent.h"
|
|
||||||
),
|
|
||||||
|
|
||||||
("PTestShellCommand", "parent"): ("TestShellCommandParent", "mozilla/ipc/TestShellParent.h"),
|
("PTestShellCommand", "parent"): ("TestShellCommandParent", "mozilla/ipc/TestShellParent.h"),
|
||||||
|
|
||||||
("PTransportProvider", "child"): (
|
("PTransportProvider", "child"): (
|
||||||
|
|
Загрузка…
Ссылка в новой задаче