Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/indexedDB/PBackgroundIDBVersionChangeTransactionChild.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/indexedDB/ActorsChild.h"
#include "mozilla/dom/indexedDB/Key.h"
#include "mozilla/dom/indexedDB/KeyPath.h"
#include "mozilla/dom/indexedDB/SerializationHelpers.h"
#include "mozilla/dom/quota/SerializationHelpers.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/dom/indexedDB/PBackgroundIDBCursorChild.h"
#include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseChild.h"
#include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseFileChild.h"
#include "mozilla/dom/indexedDB/PBackgroundIDBRequestChild.h"
#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"
namespace mozilla {
namespace dom {
namespace indexedDB {
auto PBackgroundIDBVersionChangeTransactionChild::Recv__delete__() -> mozilla::ipc::IPCResult
{
return IPC_OK();
}
MOZ_IMPLICIT PBackgroundIDBVersionChangeTransactionChild::PBackgroundIDBVersionChangeTransactionChild() :
mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PBackgroundIDBVersionChangeTransactionChild);
}
PBackgroundIDBVersionChangeTransactionChild::~PBackgroundIDBVersionChangeTransactionChild()
{
MOZ_COUNT_DTOR(PBackgroundIDBVersionChangeTransactionChild);
}
auto PBackgroundIDBVersionChangeTransactionChild::ActorAlloc() -> void
{
AddRef();
}
auto PBackgroundIDBVersionChangeTransactionChild::ActorDealloc() -> void
{
Release();
}
auto PBackgroundIDBVersionChangeTransactionChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PBackgroundIDBVersionChangeTransactionChild::OtherChildID() const -> ::GeckoChildID
{
::GeckoChildID childID =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
MOZ_RELEASE_ASSERT(childID != -1);
return childID;
}
auto PBackgroundIDBVersionChangeTransactionChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}
auto PBackgroundIDBVersionChangeTransactionChild::Manager() const -> PBackgroundIDBDatabaseChild*
{
return static_cast<PBackgroundIDBDatabaseChild*>(IProtocol::Manager());
}
auto PBackgroundIDBVersionChangeTransactionChild::ManagedPBackgroundIDBCursorChild(nsTArray<PBackgroundIDBCursorChild*>& aArr) const -> void
{
mManagedPBackgroundIDBCursorChild.ToArray(aArr);
}
auto PBackgroundIDBVersionChangeTransactionChild::ManagedPBackgroundIDBCursorChild() const -> const ManagedContainer<PBackgroundIDBCursorChild>&
{
return mManagedPBackgroundIDBCursorChild;
}
auto PBackgroundIDBVersionChangeTransactionChild::ManagedPBackgroundIDBRequestChild(nsTArray<PBackgroundIDBRequestChild*>& aArr) const -> void
{
mManagedPBackgroundIDBRequestChild.ToArray(aArr);
}
auto PBackgroundIDBVersionChangeTransactionChild::ManagedPBackgroundIDBRequestChild() const -> const ManagedContainer<PBackgroundIDBRequestChild>&
{
return mManagedPBackgroundIDBRequestChild;
}
auto PBackgroundIDBVersionChangeTransactionChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
static constexpr ::mozilla::ipc::ProtocolId sIds[] = {
PBackgroundIDBCursorMsgStart,
PBackgroundIDBRequestMsgStart
};
return sIds;
}
auto PBackgroundIDBVersionChangeTransactionChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
case PBackgroundIDBCursorMsgStart:
return (&(mManagedPBackgroundIDBCursorChild));
case PBackgroundIDBRequestMsgStart:
return (&(mManagedPBackgroundIDBRequestChild));
default:
return nullptr;
}
}
auto PBackgroundIDBVersionChangeTransactionChild::OpenPBackgroundIDBCursorEndpoint(PBackgroundIDBCursorChild* aActor) -> ManagedEndpoint<PBackgroundIDBCursorParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundIDBCursorChild actor");
return ManagedEndpoint<PBackgroundIDBCursorParent>();
}
if (!aActor->SetManagerAndRegister(this)) {
NS_WARNING("Failed to bind PBackgroundIDBCursorChild actor");
return ManagedEndpoint<PBackgroundIDBCursorParent>();
}
// Mark our actor as awaiting the other side to be bound. This will
// be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
// received.
aActor->mAwaitingManagedEndpointBind = true;
return ManagedEndpoint<PBackgroundIDBCursorParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}
auto PBackgroundIDBVersionChangeTransactionChild::BindPBackgroundIDBCursorEndpoint(
ManagedEndpoint<PBackgroundIDBCursorChild> aEndpoint,
PBackgroundIDBCursorChild* aActor) -> bool
{
return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}
auto PBackgroundIDBVersionChangeTransactionChild::OpenPBackgroundIDBRequestEndpoint(PBackgroundIDBRequestChild* aActor) -> ManagedEndpoint<PBackgroundIDBRequestParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundIDBRequestChild actor");
return ManagedEndpoint<PBackgroundIDBRequestParent>();
}
if (!aActor->SetManagerAndRegister(this)) {
NS_WARNING("Failed to bind PBackgroundIDBRequestChild actor");
return ManagedEndpoint<PBackgroundIDBRequestParent>();
}
// Mark our actor as awaiting the other side to be bound. This will
// be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
// received.
aActor->mAwaitingManagedEndpointBind = true;
return ManagedEndpoint<PBackgroundIDBRequestParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}
auto PBackgroundIDBVersionChangeTransactionChild::BindPBackgroundIDBRequestEndpoint(
ManagedEndpoint<PBackgroundIDBRequestChild> aEndpoint,
PBackgroundIDBRequestChild* aActor) -> bool
{
return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}
auto PBackgroundIDBVersionChangeTransactionChild::SendDeleteMe() -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_DeleteMe(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_DeleteMe", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendCommit(const mozilla::Maybe<int64_t>& lastRequest) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_Commit(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), lastRequest);
// Sentinel = 'lastRequest'
((&(writer__)))->WriteSentinel(458359966);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_Commit", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendAbort(const nsresult& resultCode) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_Abort(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), resultCode);
// Sentinel = 'resultCode'
((&(writer__)))->WriteSentinel(388498459);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_Abort", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendCreateObjectStore(const ObjectStoreMetadata& metadata) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_CreateObjectStore(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), metadata);
// Sentinel = 'metadata'
((&(writer__)))->WriteSentinel(248251202);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_CreateObjectStore", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendDeleteObjectStore(const int64_t& objectStoreId) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_DeleteObjectStore(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), objectStoreId);
// Sentinel = 'objectStoreId'
((&(writer__)))->WriteSentinel(620234034);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_DeleteObjectStore", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendRenameObjectStore(
const int64_t& objectStoreId,
const nsAString& name) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_RenameObjectStore(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), objectStoreId);
// Sentinel = 'objectStoreId'
((&(writer__)))->WriteSentinel(620234034);
IPC::WriteParam((&(writer__)), name);
// Sentinel = 'name'
((&(writer__)))->WriteSentinel(69075362);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_RenameObjectStore", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendCreateIndex(
const int64_t& objectStoreId,
const IndexMetadata& metadata) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_CreateIndex(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), objectStoreId);
// Sentinel = 'objectStoreId'
((&(writer__)))->WriteSentinel(620234034);
IPC::WriteParam((&(writer__)), metadata);
// Sentinel = 'metadata'
((&(writer__)))->WriteSentinel(248251202);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_CreateIndex", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendDeleteIndex(
const int64_t& objectStoreId,
const int64_t& indexId) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_DeleteIndex(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), objectStoreId);
// Sentinel = 'objectStoreId'
((&(writer__)))->WriteSentinel(620234034);
IPC::WriteParam((&(writer__)), indexId);
// Sentinel = 'indexId'
((&(writer__)))->WriteSentinel(190841542);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_DeleteIndex", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendRenameIndex(
const int64_t& objectStoreId,
const int64_t& indexId,
const nsAString& name) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_RenameIndex(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), objectStoreId);
// Sentinel = 'objectStoreId'
((&(writer__)))->WriteSentinel(620234034);
IPC::WriteParam((&(writer__)), indexId);
// Sentinel = 'indexId'
((&(writer__)))->WriteSentinel(190841542);
IPC::WriteParam((&(writer__)), name);
// Sentinel = 'name'
((&(writer__)))->WriteSentinel(69075362);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_RenameIndex", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendPBackgroundIDBCursorConstructor(
PBackgroundIDBCursorChild* actor,
const int64_t& requestId,
const OpenCursorParams& params) -> PBackgroundIDBCursorChild*
{
if (!actor) {
NS_WARNING("Cannot bind null PBackgroundIDBCursorChild actor");
return nullptr;
}
if (!actor->SetManagerAndRegister(this)) {
NS_WARNING("Failed to bind PBackgroundIDBCursorChild actor");
return nullptr;
}
// Build our constructor message.
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_PBackgroundIDBCursorConstructor(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), actor);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
IPC::WriteParam((&(writer__)), requestId);
// Sentinel = 'requestId'
((&(writer__)))->WriteSentinel(320799671);
IPC::WriteParam((&(writer__)), params);
// Sentinel = 'params'
((&(writer__)))->WriteSentinel(146997893);
// Notify the other side about the newly created actor. This can
// fail if our manager has already been destroyed.
//
// NOTE: If the send call fails due to toplevel channel teardown,
// the `IProtocol::ChannelSend` wrapper absorbs the error for us,
// so we don't tear down actors unexpectedly.
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_PBackgroundIDBCursorConstructor", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
// Warn, destroy the actor, and return null if the message failed to
// send. Otherwise, return the successfully created actor reference.
if (!sendok__) {
NS_WARNING("Error sending PBackgroundIDBCursorChild constructor");
actor->ActorDisconnected(FailedConstructor);
return nullptr;
}
return actor;
}
auto PBackgroundIDBVersionChangeTransactionChild::SendPBackgroundIDBRequestConstructor(
const int64_t& requestId,
const RequestParams& params) -> PBackgroundIDBRequestChild*
{
PBackgroundIDBRequestChild* actor = (static_cast<indexedDB::BackgroundVersionChangeTransactionChild*>(this))->AllocPBackgroundIDBRequestChild(requestId, params);
return SendPBackgroundIDBRequestConstructor(std::move(actor), std::move(requestId), std::move(params));
}
auto PBackgroundIDBVersionChangeTransactionChild::SendPBackgroundIDBRequestConstructor(
PBackgroundIDBRequestChild* actor,
const int64_t& requestId,
const RequestParams& params) -> PBackgroundIDBRequestChild*
{
if (!actor) {
NS_WARNING("Cannot bind null PBackgroundIDBRequestChild actor");
return nullptr;
}
if (!actor->SetManagerAndRegister(this)) {
NS_WARNING("Failed to bind PBackgroundIDBRequestChild actor");
return nullptr;
}
// Build our constructor message.
UniquePtr<IPC::Message> msg__ = PBackgroundIDBVersionChangeTransaction::Msg_PBackgroundIDBRequestConstructor(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), actor);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
IPC::WriteParam((&(writer__)), requestId);
// Sentinel = 'requestId'
((&(writer__)))->WriteSentinel(320799671);
IPC::WriteParam((&(writer__)), params);
// Sentinel = 'params'
((&(writer__)))->WriteSentinel(146997893);
// Notify the other side about the newly created actor. This can
// fail if our manager has already been destroyed.
//
// NOTE: If the send call fails due to toplevel channel teardown,
// the `IProtocol::ChannelSend` wrapper absorbs the error for us,
// so we don't tear down actors unexpectedly.
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_PBackgroundIDBRequestConstructor", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
// Warn, destroy the actor, and return null if the message failed to
// send. Otherwise, return the successfully created actor reference.
if (!sendok__) {
NS_WARNING("Error sending PBackgroundIDBRequestChild constructor");
actor->ActorDisconnected(FailedConstructor);
return nullptr;
}
return actor;
}
auto PBackgroundIDBVersionChangeTransactionChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
switch (aProtocolId) {
case PBackgroundIDBRequestMsgStart:
static_cast<indexedDB::BackgroundVersionChangeTransactionChild*>(this)->DeallocPBackgroundIDBRequestChild(static_cast<PBackgroundIDBRequestChild*>(aListener));
return;
default:
FatalError("unreached");
return;
}
}
auto PBackgroundIDBVersionChangeTransactionChild::OnMessageReceived(const Message& msg__) -> PBackgroundIDBVersionChangeTransactionChild::Result
{
switch (msg__.type()) {
case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE:
{
if (!mAwaitingManagedEndpointBind) {
NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
return MsgNotAllowed;
}
mAwaitingManagedEndpointBind = false;
return MsgProcessed;
}
case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE:
{
if (!mAwaitingManagedEndpointBind) {
NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
return MsgNotAllowed;
}
mAwaitingManagedEndpointBind = false;
this->ActorDisconnected(ManagedEndpointDropped);
return MsgProcessed;
}
case PBackgroundIDBVersionChangeTransaction::Reply_PBackgroundIDBCursorConstructor__ID:
{
return MsgProcessed;
}
case PBackgroundIDBVersionChangeTransaction::Reply_PBackgroundIDBRequestConstructor__ID:
{
return MsgProcessed;
}
case PBackgroundIDBVersionChangeTransaction::Msg___delete____ID:
{
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg___delete__", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<indexedDB::BackgroundVersionChangeTransactionChild*>(this))->Recv__delete__();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
this->ActorDisconnected(Deletion);
return MsgProcessed;
}
case PBackgroundIDBVersionChangeTransaction::Msg_Complete__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PBackgroundIDBVersionChangeTransaction", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundIDBVersionChangeTransactionChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PBackgroundIDBVersionChangeTransaction::Msg_Complete", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__result = IPC::ReadParam<nsresult>((&(reader__)));
if (!maybe__result) {
FatalError("Error deserializing 'nsresult'");
return MsgValueError;
}
auto& result = *maybe__result;
// Sentinel = 'result'
if ((!(((&(reader__)))->ReadSentinel(153223840)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<indexedDB::BackgroundVersionChangeTransactionChild*>(this))->RecvComplete(std::move(result));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PBackgroundIDBVersionChangeTransactionChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PBackgroundIDBVersionChangeTransactionChild::Result
{
return MsgNotKnown;
}
} // namespace indexedDB
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::indexedDB::PBackgroundIDBVersionChangeTransactionChild*>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
MOZ_RELEASE_ASSERT(
aWriter->GetActor(),
"Cannot serialize managed actors without an actor");
int32_t id;
if (!aVar) {
id = 0; // kNullActorId
} else {
id = aVar->Id();
if (id == 1) { // kFreedActorId
aVar->FatalError("Actor has been |delete|d");
}
MOZ_RELEASE_ASSERT(
aWriter->GetActor()->GetIPCChannel() == aVar->GetIPCChannel(),
"Actor must be from the same channel as the"
" actor it's being sent over");
MOZ_RELEASE_ASSERT(
aVar->CanSend(),
"Actor must still be open when sending");
}
IPC::WriteParam(aWriter, id);
}
auto ParamTraits<::mozilla::dom::indexedDB::PBackgroundIDBVersionChangeTransactionChild*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
MOZ_RELEASE_ASSERT(
aReader->GetActor(),
"Cannot deserialize managed actors without an actor");
mozilla::Maybe<mozilla::ipc::IProtocol*> actor = aReader->GetActor()
->ReadActor(aReader, true, "PBackgroundIDBVersionChangeTransaction", PBackgroundIDBVersionChangeTransactionMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::dom::indexedDB::PBackgroundIDBVersionChangeTransactionChild*>(actor.ref());
}
return {};
}
} // namespace IPC